Skip to content

Commit f57c388

Browse files
committed
chore: enable mypy strict mode for maximum type safety
Added comprehensive mypy strict configuration: - strict = true (enables all strict checks) - disallow_untyped_calls = true - disallow_untyped_decorators = true - disallow_any_generics = true - disallow_subclassing_any = true - warn_unreachable = true - strict_concatenate = true Disabled overly restrictive checks: - disallow_any_unimported = false - disallow_any_expr = false - disallow_any_decorated = false - disallow_any_explicit = false Updated overrides: - Added rivet_di._rivet_core to ignore_missing_imports - Kept behave.* for BDD testing framework All existing code passes mypy strict mode (5 source files checked). This ensures maximum type safety going forward.
1 parent 7f6d02a commit f57c388

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pyproject.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,30 @@ addopts = [
6565
[tool.mypy]
6666
python_version = "3.11"
6767
mypy_path = "python"
68+
strict = true
6869
warn_return_any = true
6970
warn_unused_configs = true
7071
disallow_untyped_defs = true
7172
disallow_incomplete_defs = true
73+
disallow_untyped_calls = true
74+
disallow_untyped_decorators = true
75+
disallow_any_unimported = false
76+
disallow_any_expr = false
77+
disallow_any_decorated = false
78+
disallow_any_explicit = false
79+
disallow_any_generics = true
80+
disallow_subclassing_any = true
7281
check_untyped_defs = true
7382
no_implicit_optional = true
7483
warn_redundant_casts = true
7584
warn_unused_ignores = true
7685
warn_no_return = true
86+
warn_unreachable = true
7787
strict_equality = true
88+
strict_concatenate = true
7889

7990
[[tool.mypy.overrides]]
80-
module = ["behave", "behave.*", "rivet_di"]
91+
module = ["behave", "behave.*", "rivet_di._rivet_core"]
8192
ignore_missing_imports = true
8293

8394
[tool.ruff]

0 commit comments

Comments
 (0)