Skip to content

Commit

Permalink
build: Replace flake8 with ruff
Browse files Browse the repository at this point in the history
Add isort (I) rules to the default set of ruff rules, as a replacement
for flake8-import-order.
  • Loading branch information
DimitriPapadopoulos authored and adrienverge committed Jan 8, 2024
1 parent 1d65ab6 commit d1b0eea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
5 changes: 5 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[lint]
extend-select = ["I"]

[lint.isort]
known-third-party = ["tests"]
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Pull Request Process

.. code:: bash
flake8 .
ruff .
If you added/modified documentation:

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ dynamic = ["version"]
[project.optional-dependencies]
dev = [
"doc8",
"flake8",
"flake8-import-order",
"rstcheck[sphinx]",
"ruff",
"sphinx",
]

Expand Down

0 comments on commit d1b0eea

Please sign in to comment.