added strict mypy checks
This commit is contained in:
@@ -24,3 +24,20 @@ dev = [
|
||||
"ruff>=0.12.10",
|
||||
"safety>=3.6.0",
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
warn_return_any = true # nudge to use stricter types
|
||||
warn_unused_configs = true # nudge to remove unused configs
|
||||
disallow_untyped_defs = true # disallow untyped function definitions
|
||||
disallow_incomplete_defs = true # ensure all parts of a function has type annotation
|
||||
check_untyped_defs = true # dont skip untyped functions
|
||||
disallow_untyped_decorators = false # allow untyped decorators to keep code more readable
|
||||
no_implicit_optional = true # disallow implicit optional types leading to None-mess
|
||||
warn_redundant_casts = true # nudge to use explicit type casts
|
||||
warn_unused_ignores = true # nudge to remove unused ignores
|
||||
warn_no_return = true # catch missing return statements
|
||||
warn_unreachable = true # catch unreachable code
|
||||
show_error_codes = true # show error codes in output
|
||||
explicit_package_bases = true # reduce risk of import confusion
|
||||
namespace_packages = true # enable namespace packages
|
||||
|
||||
Reference in New Issue
Block a user