Skip to content

Mypy: remove already complete TODO from config + turn on strict #360

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

Merged
Merged
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
32 changes: 11 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ extra-standard-library = [
[tool.pyright]
exclude = ["build", ".git"]
stubPath = "./stubs"
# Target oldest supported Python version
pythonversion = "3.9"
pythonversion = "3.9" # Target oldest supported Python version
typeCheckingMode = "standard"
# Partial stubs are acceptable
reportUnknownArgumentType = false
Expand All @@ -110,24 +109,18 @@ reportSelfClsParameterName = false
reportUnsupportedDunderAll = "error"

[tool.mypy]
# Target oldest supported Python version
python_version = "3.9"
# Allow dynamic typing
disallow_any_unimported = false # TODO
disallow_any_expr = false # TODO
disallow_any_decorated = false # TODO
disallow_any_explicit = false # TODO
disallow_any_generics = false # TODO
disallow_subclassing_any = false # TODO
# Untyped definitions and calls
python_version = "3.9" # Target oldest supported Python version
strict = true
show_column_numbers = true
warn_unused_ignores = false # Change from pandas
# Partial stubs are acceptable
disallow_any_generics = false
disallow_incomplete_defs = false
disallow_untyped_defs = false
# Allow dynamic typing in our own code
warn_return_any = false # TODO
disallow_untyped_calls = false # TODO
disallow_untyped_defs = false # TODO
disallow_incomplete_defs = false # TODO
check_untyped_defs = true
disallow_untyped_decorators = true
# Configuring warnings
warn_redundant_casts = true
warn_unused_ignores = false # Change from pandas
# Suppressing errors
disable_error_code = [
# Not all imports in these stubs are gonna be typed
Expand All @@ -143,9 +136,6 @@ disable_error_code = [
"operator",
"override",
"return",
"type-var",
"valid-type",
"var-annotated",
]
# Configuring error messages
show_column_numbers = true