Skip to content

Commit

Permalink
enforce formatting checks
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-barfoot committed Jun 14, 2023
1 parent fef26ef commit 7720549
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install black
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Install software
run: |
Expand All @@ -36,8 +37,10 @@ jobs:
run: |
# 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
flake8 . --count --max-complexity=10 --max-line-length=120 --statistics
- name: Check code formatting with black
run: |
black --check .
- name: Run unittests
run: |
python -m pytest

0 comments on commit 7720549

Please sign in to comment.