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

Enable more of mypy's diagnostics #984

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
31 changes: 30 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
[mypy]
namespace_packages = True

# Enable strict optional checks
strict_optional = True

# Disallow incomplete or untyped definitions
disallow_incomplete_defs = True
disallow_untyped_defs = True
disallow_untyped_calls = True
disallow_untyped_decorators = True

# Disallow the use of `Any` in various contexts
disallow_any_generics = True
disallow_any_unimported = True
disallow_subclassing_any = True

# Ensure strict equality checks
strict_equality = True

# Enable warnings for redundant casts, unreachable code, and functions that return `Any`
warn_redundant_casts = True
warn_unreachable = True
warn_return_any = True

# Additional warnings
warn_unused_ignores = True
warn_unused_configs = True
warn_redundant_casts = True

# Additional strict checks
check_untyped_defs = True
no_implicit_optional = True
extra_checks = True
local_partial_types = True
show_error_context = True

# Import handling
ignore_missing_imports = False

# Disallow redefinition of variables
allow_redefinition = False
Loading