Enable mypy pre-commit hook
Change-Id: I266a2866627fcf66d0f5111c9237a37e55414685
This commit is contained in:
parent
9127c121da
commit
434ef3018e
@ -47,6 +47,16 @@ repos:
|
|||||||
- id: hacking
|
- id: hacking
|
||||||
additional_dependencies: ['neutron', 'neutron-lib']
|
additional_dependencies: ['neutron', 'neutron-lib']
|
||||||
exclude: '^(doc|releasenotes|tools)/.*$'
|
exclude: '^(doc|releasenotes|tools)/.*$'
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
|
rev: v1.14.1
|
||||||
|
hooks:
|
||||||
|
- id: mypy
|
||||||
|
args: [--config-file=./mypy.ini]
|
||||||
|
pass_filenames: false
|
||||||
|
# need to list alembic here; otherwise it doesn't see internals
|
||||||
|
# necessary to detect one of 'ignored' errors and complains about
|
||||||
|
# unnecessary ignore; other dependencies can be left out it seems
|
||||||
|
additional_dependencies: ['alembic']
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
|
2
mypy.ini
2
mypy.ini
@ -12,6 +12,8 @@ disable_error_code = import-untyped,var-annotated,import-not-found
|
|||||||
# honor excludes by not following there through imports
|
# honor excludes by not following there through imports
|
||||||
follow_imports = silent
|
follow_imports = silent
|
||||||
|
|
||||||
|
files = neutron
|
||||||
|
|
||||||
# NOTE: Gradually enable type checking for each package.
|
# NOTE: Gradually enable type checking for each package.
|
||||||
# Finally, when the whole repo is migrated this option can be deleted
|
# Finally, when the whole repo is migrated this option can be deleted
|
||||||
# and rules applied to the whole repo.
|
# and rules applied to the whole repo.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user