@@ -3,6 +3,9 @@ minversion = 4.0.2
33envlist = py3,pep8,cover
44skipsdist = True
55
6+ [vars]
7+ all_path = {toxinidir}
8+
69[testenv]
710usedevelop = True
811setenv = VIRTUAL_ENV ={envdir}
@@ -12,8 +15,25 @@ deps =
1215 git+https://github.com/cloudbase/python-coriolisclient.git
1316commands = stestr run --slowest --exclude-regex coriolis.tests.integration {posargs}
1417
18+ [testenv:fmt]
19+ description = Format the code based on the coding style standards.
20+ deps =
21+ ruff
22+ commands =
23+ ruff check --select I --fix {[vars]all_path}
24+ ruff format {[vars]all_path}
25+
1526[testenv:pep8]
16- commands = flake8 {posargs}
27+ description = Verify the coding style (pep8).
28+ deps =
29+ ruff
30+ flake8>=7.0.0
31+ pyflakes>=3.2.0
32+ hacking>=7.0.0,<7.1.0
33+ commands =
34+ ruff format --diff {[vars]all_path}
35+ ruff check {[vars]all_path}
36+ flake8 {[vars]all_path}
1737
1838[testenv:cover]
1939setenv =
@@ -48,6 +68,9 @@ omit = coriolis/tests/*
4868[flake8]
4969# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
5070# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
71+ #
72+ # E501 (line too long) is left to ruff
73+ # E203 (whitespace before ':') conflicts with how ruff formats slices.
5174
52- ignore = E125,E251,W503,W504,E305,E731,E117,W605,F632,H401,H403,H404,H405,H202
75+ ignore = E125,E251,W503,W504,E305,E731,E117,W605,F632,H401,H403,H404,H405,H202,E501,E203,H301,H306
5376exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
0 commit comments