Skip to content

Commit

Permalink
Lint codebase with ruff
Browse files Browse the repository at this point in the history
Ruff replaces both isort and flake8
  • Loading branch information
jpvanhal committed Aug 27, 2023
1 parent 916cf08 commit 77c5849
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 isort pytest
- name: Lint with flake8
python -m pip install ruff==0.0.286 pytest
- name: Lint with Ruff
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Sort imports with isort
run: |
isort --diff --check-only .
ruff check .
- name: Test with pytest
run: |
pytest
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ dependencies = []
"Bug Tracker" = "http://github.com/fastmonkeys/qstring/issues"
"Code" = "http://github.com/fastmonkeys/qstring"

[tool.isort]
known_first_party = "qstring"
skip = "docs"
line_length = 79
multi_line_output = 3
[tool.ruff]
extend-exclude = ["docs"]
select = ["E", "F", "I"]
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

0 comments on commit 77c5849

Please sign in to comment.