diff --git a/Changelog b/Changelog index 5639d98..0133798 100644 --- a/Changelog +++ b/Changelog @@ -6,6 +6,7 @@ Version 0.1.27 unreleased * Adjust GHA build process to allow builds for stacked PRs. * Add a new `run clean` target to clean up generated data. * Move unit tests from `tests` into `src/tests/uciparse`. + * Update the MyPy configuration so we're using latest rules. * Update the jinja2 transitive dependency to address CVE-2025-27516. * Update the requests transitive dependency to address CVE-2024-47081. * Update the urllib3 transitive dependency to address CVE-2025-50181. diff --git a/pyproject.toml b/pyproject.toml index 89499e7..b894963 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,12 +110,12 @@ filterwarnings = [ ] [tool.mypy] -# Settings are mostly equivalent to strict=true as of v1.14.1 +files = [ "src" ] pretty = true show_absolute_path = true show_column_numbers = true show_error_codes = true -files = [ "src" ] +# Settings equivalent to strict=true as of v1.17.1 check_untyped_defs = true disallow_any_generics = true disallow_incomplete_defs = true @@ -123,23 +123,21 @@ disallow_subclassing_any = true disallow_untyped_calls = true disallow_untyped_decorators = false disallow_untyped_defs = true -no_implicit_optional = true +extra_checks = true no_implicit_reexport = true strict_equality = true -strict_optional = true warn_redundant_casts = true warn_return_any = true -warn_no_return = true warn_unused_configs = true warn_unused_ignores = true +# Additional settings above and beyond strict=true +implicit_optional = false +strict_optional = true +warn_no_return = true +warn_unreachable = true # It's hard to make tests compliant using unittest.mock [[tool.mypy.overrides]] module = "tests.*" check_untyped_defs = false allow_untyped_defs = true - -# There is no type hinting for pytest -[[tool.mypy.overrides]] -module = "pytest" -ignore_missing_imports = true