From bf317cfd3a0960c54d9818bb46cacb650c9d59e0 Mon Sep 17 00:00:00 2001 From: tihom Date: Sat, 24 Aug 2024 09:52:23 -0500 Subject: [PATCH] added flake8 to dev dependencies --- .github/workflows/python-app.yml | 9 ++---- poetry.lock | 55 +++++++++++++++++++++++++++++++- pyproject.toml | 1 + 3 files changed, 58 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 64b80d1..67cd051 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,16 +27,13 @@ jobs: uses: snok/install-poetry@v1 - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install flake8 pytest - poetry install - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + poetry install --with dev - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 mango --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 mango --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | pytest tests/ diff --git a/poetry.lock b/poetry.lock index 7d5257e..3d4489c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -624,6 +624,23 @@ files = [ [package.extras] devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benchmark", "pytest-cache", "validictory"] +[[package]] +name = "flake8" +version = "7.1.1" +description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" +optional = false +python-versions = ">=3.8.1" +files = [ + {file = "flake8-7.1.1-py2.py3-none-any.whl", hash = "sha256:597477df7860daa5aa0fdd84bf5208a043ab96b8e96ab708770ae0364dd03213"}, + {file = "flake8-7.1.1.tar.gz", hash = "sha256:049d058491e228e03e67b390f311bbf88fce2dbaa8fa673e7aea87b7198b8d38"}, +] + +[package.dependencies] +mccabe = ">=0.7.0,<0.8.0" +pycodestyle = ">=2.12.0,<2.13.0" +pyflakes = ">=3.2.0,<3.3.0" + [[package]] name = "fqdn" version = "1.4.0" @@ -1306,6 +1323,18 @@ files = [ [package.dependencies] traitlets = "*" +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + [[package]] name = "mistune" version = "3.0.2" @@ -1728,6 +1757,18 @@ files = [ [package.extras] tests = ["pytest"] +[[package]] +name = "pycodestyle" +version = "2.12.1" +description = "Python style guide checker" +category = "dev" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycodestyle-2.12.1-py2.py3-none-any.whl", hash = "sha256:46f0fb92069a7c28ab7bb558f05bfc0110dac69a0cd23c61ea0040283a9d78b3"}, + {file = "pycodestyle-2.12.1.tar.gz", hash = "sha256:6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521"}, +] + [[package]] name = "pycparser" version = "2.22" @@ -1740,6 +1781,18 @@ files = [ {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] +[[package]] +name = "pyflakes" +version = "3.2.0" +description = "passive checker of Python programs" +category = "dev" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a"}, + {file = "pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f"}, +] + [[package]] name = "pygments" version = "2.18.0" @@ -2691,4 +2744,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.10" -content-hash = "e768b5265631ec75d305b67870dcfa4b53d57bf3a4a2709e5e5991fd8e171a35" +content-hash = "ae9be6776aef1524dcba4dc6432525eebbc562836f1de2809269f8780f0ff893" diff --git a/pyproject.toml b/pyproject.toml index 420c2f5..536484e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ attrdict = ">=2.0.1" black = "^24.2.0" pytest = "^7.4.0" jupyter = "^1.0.0" +flake8 = "^7.1.1" [build-system] requires = ["poetry-core>=1.0.0"]