Skip to content

Commit

Permalink
Start adding flake8 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sin-diesel committed Oct 26, 2024
1 parent 019e603 commit b000114
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ permissions:

jobs:
build:

runs-on: ubuntu-24.04

steps:
Expand All @@ -23,16 +22,16 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.12"

- name: Install dependencies
run: |
curl -sSLO https://pdm-project.org/install-pdm.py
curl -sSL https://pdm-project.org/install-pdm.py.sha256 | shasum -a 256 -c -
python3 install-pdm.py
pdm install
- name: Lint
run: |
black . --check
# 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 .
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ distribution = true
[tool.black]
line_length = "127"

[tool.flake8]
select = ["E9", "F63", "F7", "F82"]
show_source = true
statistics = true
exclude = [".venv", ".git"]

0 comments on commit b000114

Please sign in to comment.