Skip to content

Commit 995bbe5

Browse files
committed
Fix mypy config
Signed-off-by: Mihai Criveti <[email protected]>
1 parent 4848df1 commit 995bbe5

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

pyproject.toml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,34 @@ profile = "black"
220220
multi_line_output = 3
221221

222222
[tool.mypy]
223-
python_version = "3.10"
224-
warn_return_any = true
225-
warn_unused_configs = true
226-
disallow_untyped_defs = true
227-
strict = true
228-
show_error_codes = true
229-
warn_unreachable = true
223+
# Target Python version
224+
python_version = "3.11"
225+
226+
# Full strictness and individual checks
227+
strict = true # Enable all strict checks
228+
229+
check_untyped_defs = true # Type-check the bodies of untyped functions
230+
no_implicit_optional = true # Require explicit Optional for None default
231+
disallow_untyped_defs = true # Require type annotations for all functions
232+
disallow_untyped_calls = true # Disallow calling functions without type info
233+
disallow_any_unimported = true # Disallow Any from missing imports
234+
warn_return_any = true # Warn if a function returns Any
235+
warn_unreachable = true # Warn about unreachable code
236+
warn_unused_ignores = true # Warn if a "# type: ignore" is unnecessary
237+
warn_unused_configs = true # Warn about unused config options
238+
warn_redundant_casts = true # Warn if a cast does nothing
239+
strict_equality = true # Disallow ==/!= between incompatible types
240+
241+
# Output formatting
242+
show_error_codes = true # Show error codes in output
243+
pretty = true # Format output nicely
244+
245+
# Exclude these paths from analysis
246+
exclude = [
247+
'^build/',
248+
'^\\.venv/',
249+
'^\\.mypy_cache/',
250+
]
230251

231252
[tool.pytest.ini_options]
232253
minversion = "6.0"

0 commit comments

Comments
 (0)