Experiment with ruff
The cool new Python linting tool. "tox -e ruff" to check and "tox -e ruff -- --fix" to auto-fix code. This isn't approved in openstack/requirements at this time, but developers might like trying it out. Change-Id: I7d39f9043d607b174a53d804a57235a62bbfa6d8
This commit is contained in:
parent
8f5373ac3c
commit
4092805978
5
ruff.toml
Normal file
5
ruff.toml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# hacking already covers E402 (and disagrees w/ ruff)
|
||||||
|
ignore = ["E402"]
|
||||||
|
|
||||||
|
[per-file-ignores]
|
||||||
|
"cinder/volume/drivers/fungible/swagger_api_client.py" = ["E501"]
|
7
tox.ini
7
tox.ini
@ -280,3 +280,10 @@ paths = ./cinder/tests/hacking
|
|||||||
[doc8]
|
[doc8]
|
||||||
ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs,doc/source/configuration/tables,./*.txt,releasenotes,doc/source/contributor/api,doc/test
|
ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs,doc/source/configuration/tables,./*.txt,releasenotes,doc/source/contributor/api,doc/test
|
||||||
extension=.txt,.rst,.inc
|
extension=.txt,.rst,.inc
|
||||||
|
|
||||||
|
[testenv:ruff]
|
||||||
|
deps = -r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
ruff
|
||||||
|
commands =
|
||||||
|
ruff {toxinidir}/cinder {posargs}
|
||||||
|
Loading…
Reference in New Issue
Block a user