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

17
tox.ini
View File

@@ -99,14 +99,6 @@ extras =
commands =
stestr --test-path=./nova/tests/functional run --exclude-regex '((?:api|notification)_sample_tests|functional\.db\.)' {posargs}
[testenv:mypy]
description =
Run type checks.
envdir = {toxworkdir}/shared
extras =
commands =
bash tools/mypywrap.sh {posargs}
[testenv:pep8]
description =
Run style checks.
@@ -116,6 +108,15 @@ extras =
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:mypy]
description =
Run type checks.
deps =
pre-commit
extras =
commands =
pre-commit run --all-files --show-diff-on-failure mypy
[testenv:autopep8]
extras =
deps =
Reference in New Issue
openstack/nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.