-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable strict type checking with mypy
- Update mypy configuration with stricter type checking rules - Add more type stubs to pre-commit configuration - Run mypy both through pre-commit and directly in CI - Install project in editable mode for better type checking - Set correct PYTHONPATH in CI environment
- Loading branch information
1 parent
5b7fcfb
commit 66bd8fd
Showing
3 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
[mypy] | ||
warn_unused_configs = True | ||
# Error output | ||
show_error_codes = True | ||
pretty = True | ||
show_column_numbers = True | ||
|
||
# Import discovery | ||
ignore_missing_imports = True | ||
follow_imports = normal | ||
|
||
# Untyped definitions and calls | ||
disallow_untyped_defs = True | ||
check_untyped_defs = True | ||
explicit_package_bases = True | ||
warn_unreachable = True | ||
warn_redundant_casts = True | ||
disallow_incomplete_defs = True | ||
disallow_untyped_decorators = True | ||
|
||
# None and Optional handling | ||
no_implicit_optional = True | ||
strict_optional = True | ||
|
||
# Warnings | ||
warn_unused_configs = True | ||
warn_redundant_casts = True | ||
warn_unused_ignores = True | ||
warn_return_any = True | ||
warn_unreachable = True | ||
|
||
# Misc | ||
explicit_package_bases = True |