Skip to content

Commit

Permalink
Use ruff for python linting (#2296)
Browse files Browse the repository at this point in the history
* Ruff MVP

* Fix CI workflow deps

* Fix all linting errors

* Fixed type errors

* No fail fast

* Move ruff config

* Fix src

* I am going insane

* Remove fail fast

---------

Co-authored-by: Joey Ballentine <34788790+joeyballentine@users.noreply.github.com>
  • Loading branch information
RunDevelopment and joeyballentine committed Nov 3, 2023
1 parent dad9c44 commit 9918d12
Show file tree
Hide file tree
Showing 50 changed files with 185 additions and 511 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/lint-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
paths:
- 'backend/**'
- '.github/workflows/**'
- '.pylintrc'
- 'pyproject.toml'
- 'requirements.txt'
push:
branches: [main]
Expand All @@ -32,10 +32,7 @@ jobs:
python-version: '3.9'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Black
run: black --check backend/
- name: isort
run: isort backend/ --check --profile=black --src=backend/src
- run: ruff format backend --check

backend-lint:
runs-on: ubuntu-latest
Expand All @@ -46,8 +43,7 @@ jobs:
python-version: '3.9'
cache: 'pip'
- run: pip install -r requirements.txt
- name: pylint
run: pylint backend/ --output-format=colorized --disable="C,R" --fail-under=10
- run: ruff check backend

backend-pyright:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 9918d12

Please sign in to comment.