Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve, clean up, and stricten the mypy configuration #641

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ repos:
language: python
files: ^src/package/|^tests/
types: [text, python]
args: [--show-traceback, --config-file, pyproject.toml]
args: [--config-file, pyproject.toml]

# Check for potential security issues.
- repo: https://github.com/PyCQA/bandit
Expand Down
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,27 @@ skip_gitignore = true

# https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml
[tool.mypy]
mypy_path = "src/package/:tests/"
behnazh marked this conversation as resolved.
Show resolved Hide resolved
# exclude=
# mypy_path =
# exclude =
show_error_codes = true
show_column_numbers = true
pretty = true
show_traceback = true
check_untyped_defs = true
incremental = false
strict_equality = true
strict = true
warn_return_any = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
disallow_any_explicit = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disable_error_code = []
# disable_error_code =
# allow_redefinition =

[[tool.mypy.overrides]]
module = [
Expand Down