Development: introduce Ruff as linter/formatter (#3039)

This commit is contained in:
Luca
2025-04-18 09:59:18 +02:00
committed by GitHub
parent a941156f26
commit 5a2d84d8b4
5 changed files with 68 additions and 8 deletions

View File

@@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint with flake8
- name: Lint with Ruff
run: |
pip3 install flake8
# 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
pip install ruff
# Check for syntax errors and undefined names
ruff check . --select E9,F63,F7,F82
# Complete check with errors treated as warnings
ruff check . --exit-zero
test-application-3-10:
needs: lint-code
@@ -41,5 +41,4 @@ jobs:
uses: ./.github/workflows/test-stack-reusable-workflow.yml
with:
python-version: '3.13'
skip-pypuppeteer: true
skip-pypuppeteer: true