From ead7117baffdd888f2c028c64e78774a92898728 Mon Sep 17 00:00:00 2001 From: Alexey Turovskiy Date: Thu, 8 Feb 2024 15:24:51 +0700 Subject: [PATCH] Add PEP8 linting --- .github/workflows/main.yml | 23 +++++++++++++++++------ setup.cfg | 15 +++++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 setup.cfg diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index defc3e7864..070d137203 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,13 +1,24 @@ -name: Main Taski Workflow +name: Main Taski workflow + on: push: branches: - main + jobs: - checkout-and-print-tree: + tests: runs-on: ubuntu-latest + steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: Print project tree - run: tree . \ No newline at end of file + - name: Check out code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8==6.0.0 flake8-isort==6.0.0 + - name: Test with flake8 + run: python -m flake8 backend/ \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..90f9beaf5e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,15 @@ +[flake8] +ignore = + W503, + F811 +exclude = + tests/, + */migrations/, + venv/, + */venv/, + .venv/, + */.venv/, + env/, + */env/, +per-file-ignores = + */settings.py:E501 \ No newline at end of file