Skip to content

Commit

Permalink
Add style and format checking
Browse files Browse the repository at this point in the history
  • Loading branch information
rgallardone committed Jun 27, 2024
1 parent 974e39f commit 30727ee
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
max-line-length = 100
exclude = .venv
ignore =
# disable, whitespace before ':' https://github.com/TCLResearchEurope/ctw-pre-commit-hooks/issues/3
E203,
# disable "too many leading '#' for block comment"
E266,
# disable "line break before binary operator" which clashes with black
W503,
# disable "invalid escape sequence"
W605,
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ jobs:
run: |
pip install -r requirements.txt -r requirements-dev.txt -r requirements-test.txt
- name: Check format with black
run: black --check --extend-exclude tests .

- name: Check style with flake8
run: flake8 --extend-exclude tests .

- name: Check import sorting with isort
run: isort --check --extend-skip tests .

- name: Run model tests
run: make model-test

Expand Down
2 changes: 1 addition & 1 deletion challenge/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from challenge.api import app

application = app
application = app

0 comments on commit 30727ee

Please sign in to comment.