Skip to content

Commit

Permalink
Start using Python linter Ruff on development flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ilesoft committed Dec 20, 2024
1 parent c2bdf34 commit d81781c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install 'djlint==1.36.3'
pip install 'ruff==0.8.2'
- name: Check formatting
run: |
djlint --profile=django --lint --ignore "H006,H013,H030,H031,D018,T003" .
ruff check
unit-tests-sqlite:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down
4 changes: 4 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ säännöistä on poistettu käytöstä:
* D018: {% url ... %} templaateissa
* T003: nimetyt endblock tagit templaateissa

Python-tiedostojen tarkastamiseen käytetään lintteriä nimeltä Ruff.
Repositorion juuressa on tiedosto ruff.toml, jossa määritellään tarvittavat
poikkeukset Ruff:in oletussääntöihin.

## Selityksiä lähdekooditiedostoista

* `web/tupa/`
Expand Down
3 changes: 3 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[lint.per-file-ignores]
# Star import are needed for proper setting overriding
"web/settings/__init__.py" = ["F403"]

0 comments on commit d81781c

Please sign in to comment.