Skip to content

Commit 8f9364f

Browse files
authored
feat: Upgrade Python linting from flake8 to ruff
[Ruff](https://beta.ruff.rs/) supports [over 500 lint rules](https://beta.ruff.rs/docs/rules) including bandit, isort, pylint, pyupgrade, and flake8 plus its plugins and is written in Rust for speed. This GitHub Action will provide contributors with intuitive GitHub Annotations. ![image](https://user-images.githubusercontent.com/3709715/223758136-afc386d2-70aa-4eff-953a-2c2d82ceea23.png) The `Required` in the checks below should be: 1. Removed from `flake8-annotation` and added to `ruff-annotation` which replaces it. 2. Removed from `isort` and added to `ruff` which replaces it.
1 parent 39ac2c1 commit 8f9364f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
- name: Install Dependencies
3434
run: |
3535
npm install --no-progress
36-
pip install flake8 pytest
36+
pip install pytest ruff
3737
- name: Set Windows environment
3838
if: startsWith(matrix.os, 'windows')
3939
run: |
4040
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
4141
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
4242
- name: Lint Python
4343
if: startsWith(matrix.os, 'ubuntu')
44-
run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics
44+
run: ruff --format=github --target-version=py37 .
4545
- name: Run Python tests
4646
run: python -m pytest
4747
# - name: Run doctests with pytest

0 commit comments

Comments
 (0)