diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e540ea00..69e650c35 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,12 @@ repos: hooks: - id: remove-tabs exclude: '.*\.(svg)$' + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.14.1 + hooks: + - id: mypy + args: [--config-file=./mypy.ini] + pass_filenames: false - repo: local hooks: - id: flake8 diff --git a/mypy.ini b/mypy.ini index f8d5beba4..18530c4e0 100644 --- a/mypy.ini +++ b/mypy.ini @@ -11,3 +11,5 @@ disable_error_code = import-untyped,var-annotated,import-not-found # honor excludes by not following there through imports follow_imports = silent + +files = neutron_lib diff --git a/tox.ini b/tox.ini index 0267bb486..5ba7bb92d 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ commands = [testenv:mypy] deps = {[testenv:pep8]deps} commands = - mypy --config-file ./mypy.ini neutron_lib + mypy --config-file ./mypy.ini [testenv:pep8] deps =