pre-commit: Add mypy

Add mypy so we can run these checks as part of our linting step. Note
that mypy is the last item in the list of checks since flake8 is going
to catch e.g. syntax issues which should be addressed first.

This also allows us to drop use of mypywrap: rather than wrapping mypy,
we can make use of mypy's configuration to specify the files we wish to
run checks on.

Change-Id: Ie51401ead4e31ccd70ab833c59cb397f802ff188
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2023-09-22 11:44:48 +01:00
committed by Sean Mooney
parent 80a2b018df
commit e3e35ba2d0
6 changed files with 70 additions and 58 deletions
+26 -1
View File
@@ -101,8 +101,33 @@ follow_imports = skip
incremental = true
check_untyped_defs = true
warn_unused_ignores = true
files =
nova/compute/manager.py,
nova/compute/pci_placement_translator.py,
nova/crypto.py,
nova/filesystem.py,
nova/limit/local.py,
nova/limit/placement.py,
nova/network/neutron.py,
nova/pci/*.py,
nova/privsep/path.py,
nova/scheduler/client/report.py,
nova/scheduler/request_filter.py,
nova/scheduler/utils.py,
nova/virt/driver.py,
nova/virt/hardware.py,
nova/virt/libvirt/machine_type_utils.py,
nova/virt/libvirt/__init__.py,
nova/virt/libvirt/cpu/__init__.py,
nova/virt/libvirt/cpu/api.py,
nova/virt/libvirt/cpu/core.py,
nova/virt/libvirt/driver.py,
nova/virt/libvirt/event.py,
nova/virt/libvirt/guest.py,
nova/virt/libvirt/host.py,
nova/virt/libvirt/utils.py
[codespell]
skip = *.po,*.js,*.css,*.html,*.svg,HACKING.py,*hacking*,*build*,*_static*,doc/dictionary.txt,*.pyc,*.inv,*.gz,*.jpg,*.png,*.vsd,*.graffle,*.json
count =
quiet-level = 4
quiet-level = 4