From 2e8cf3afff3c64a2e5786e20268d8caa7865230b Mon Sep 17 00:00:00 2001 From: Shiv Tyagi Date: Sat, 31 Jan 2026 11:36:23 +0530 Subject: [PATCH 1/2] .flake8: add flake8 config --- .flake8 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..5229a18 --- /dev/null +++ b/.flake8 @@ -0,0 +1,14 @@ +[flake8] +max-line-length = 127 +max-complexity = 10 +exclude = + .git, + __pycache__, + .pytest_cache, + *.pyc, + .venv, + venv, + env, + base/, + redis_data/, + .vagrant/ From 5b31a50e2be6565765f89187ce9ae91a89fb7252 Mon Sep 17 00:00:00 2001 From: Shiv Tyagi Date: Sat, 31 Jan 2026 12:01:04 +0530 Subject: [PATCH 2/2] .github: add workflow to run flake8 --- .github/workflows/linting.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/linting.yml diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..a54c106 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,27 @@ +name: Linting + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + flake8: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install flake8 + run: pip install flake8 + + - name: Run flake8 + run: | + flake8 . --count --show-source --statistics