From b000114805bae6074da528ba896458d52919d5ac Mon Sep 17 00:00:00 2001 From: Stanislav Date: Sat, 26 Oct 2024 17:50:10 +0300 Subject: [PATCH] Start adding flake8 configuration --- .github/workflows/python-app.yml | 9 ++++----- pyproject.toml | 6 ++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 778a458..d662b6e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -14,7 +14,6 @@ permissions: jobs: build: - runs-on: ubuntu-24.04 steps: @@ -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 . + diff --git a/pyproject.toml b/pyproject.toml index edcbd7f..9542091 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] +