diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0bb0809..248a7d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-yaml files: .*\.(yaml|yml)$ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.4 + rev: v0.14.7 hooks: - id: ruff-check args: ['--fix', '--unsafe-fixes'] @@ -24,17 +24,3 @@ repos: - id: hacking additional_dependencies: [] exclude: '^(doc|releasenotes)/.*$' - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.0 - hooks: - - id: mypy - additional_dependencies: - - Sphinx - - types-docutils - # keep this in-sync with '[mypy] exclude' in 'pyproject.toml' - exclude: | - (?x)( - doc/.* - | examples/.* - | releasenotes/.* - ) diff --git a/pyproject.toml b/pyproject.toml index d6f10e4..b0c7896 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,14 +50,9 @@ packages = [ python_version = "3.10" show_column_numbers = true show_error_context = true -ignore_missing_imports = true strict = true -# keep this in-sync with 'mypy.exclude' in '.pre-commit-config.yaml' -exclude = '''(?x)( - doc - | examples - | releasenotes -)''' +ignore_missing_imports = true +exclude = '(?x)(doc | examples | releasenotes)' [[tool.mypy.overrides]] module = ["stevedore.tests.*"] diff --git a/tox.ini b/tox.ini index 875f54b..f2555b8 100644 --- a/tox.ini +++ b/tox.ini @@ -19,12 +19,23 @@ commands = {posargs} [testenv:pep8] description = - Run style checks. -skip_install = true + Run style checks. deps = pre-commit + {[testenv:mypy]deps} commands = pre-commit run -a + {[testenv:mypy]commands} + +[testenv:mypy] +description = + Run type checks. +deps = + {[testenv]deps} + mypy + types-docutils +commands = + mypy --cache-dir="{envdir}/mypy_cache" {posargs:stevedore} [testenv:docs] deps =