diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 633680e..81ecdb7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,15 @@ repos: args: [--fix] - id: ruff-format + - repo: local + hooks: + - id: mypy + name: mypy + entry: uv run dmypy run -- src tests + language: system + types: [python] + pass_filenames: false + - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 015edb4..0000000 --- a/mypy.ini +++ /dev/null @@ -1,10 +0,0 @@ -[mypy] -python_version = 3.11 -strict = True -warn_unused_configs = True -warn_redundant_casts = True -disallow_any_generics = True -disallow_subclassing_any = True -no_implicit_optional = True -show_error_codes = True -exclude = (?x)(^third_party/|^packaging/) diff --git a/pyproject.toml b/pyproject.toml index ac3081f..6242013 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,8 +50,15 @@ target-version = "py311" select = ["E", "F", "I", "UP", "B", "SIM", "PERF", "RUF", "ANN"] [tool.mypy] - -# see mypy.ini +python_version = "3.11" +strict = true +warn_unused_configs = true +warn_redundant_casts = true +disallow_any_generics = true +disallow_subclassing_any = true +no_implicit_optional = true +show_error_codes = true +exclude = "(?x)(^third_party/|^packaging/)" [tool.pytest.ini_options] addopts = "-q --disable-warnings"