build: Replace flake8 with ruff

Add isort (I) rules to the default set of ruff rules, as a replacement
for flake8-import-order.
This commit is contained in:
Dimitri Papadopoulos 2023-12-31 13:16:08 +01:00
parent 1d65ab62cb
commit 26be7940e1
No known key found for this signature in database
GPG Key ID: 95998121D9D25F5D
5 changed files with 9 additions and 9 deletions

View File

@ -1,4 +0,0 @@
[flake8]
import-order-style = pep8
application-import-names = yamllint
ignore = W503,W504

View File

@ -21,9 +21,9 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
- run:
pip install flake8 flake8-import-order sphinx rstcheck[sphinx] doc8
pip install ruff sphinx rstcheck[sphinx] doc8
- run: pip install .
- run: flake8 .
- run: ruff .
- run: doc8 $(git ls-files '*.rst')
- run: rstcheck --ignore-directives automodule $(git ls-files '*.rst')
- run: yamllint --strict $(git ls-files '*.yaml' '*.yml')

5
.ruff.toml Normal file
View File

@ -0,0 +1,5 @@
[lint]
extend-select = ["I"]
[lint.isort]
known-third-party = ["tests"]

View File

@ -23,7 +23,7 @@ Pull Request Process
.. code:: bash
flake8 .
ruff .
If you added/modified documentation:

View File

@ -26,9 +26,8 @@ dynamic = ["version"]
[project.optional-dependencies]
dev = [
"doc8",
"flake8",
"flake8-import-order",
"rstcheck[sphinx]",
"ruff",
"sphinx",
]