From 22475b31cc06919785be046e007915e43f356793 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sun, 7 Jan 2024 18:34:56 +0100 Subject: [PATCH] remove flake8 from code base --- .devcontainer/devcontainer.json | 2 -- .github/workflows/qc_checks.yaml | 40 ++++---------------------------- requirements-dev.in | 3 --- requirements-dev.txt | 17 -------------- 4 files changed, 4 insertions(+), 58 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e6fc394897..5862479a5f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,12 +21,10 @@ "python.defaultInterpreterPath": "${containerWorkspaceFolder}/dev/venv/bin/python", "python.linting.enabled": true, "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", "python.formatting.blackPath": "/usr/local/py-utils/bin/black", "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 80ad555380..8a3e1d609b 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -47,27 +47,11 @@ jobs: frontend: - 'src/frontend/**' - pep_style: - name: Style [Python] - runs-on: ubuntu-20.04 - - needs: paths-filter - if: needs.paths-filter.outputs.server == 'true' - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1 - - name: Environment Setup - uses: ./.github/actions/setup - with: - dev-install: true - - name: Run flake8 - run: flake8 InvenTree --extend-ignore=D - javascript: name: Style - Classic UI [JS] runs-on: ubuntu-20.04 - needs: [ 'pep_style', 'pre-commit' ] + needs: [ 'pre-commit' ] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1 @@ -167,27 +151,11 @@ jobs: invoke check-server coverage run -m unittest discover -s test/ - docstyle: - name: Style [Python Docstrings] - runs-on: ubuntu-20.04 - - needs: pre-commit - continue-on-error: true - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1 - - name: Environment Setup - uses: ./.github/actions/setup - with: - install: true - - name: Run flake8 - run: flake8 InvenTree --statistics - coverage: name: Tests - DB [SQLite] + Coverage runs-on: ubuntu-20.04 - needs: [ 'pep_style', 'pre-commit' ] + needs: [ 'pre-commit' ] continue-on-error: true # continue if a step fails so that coverage gets pushed env: @@ -220,7 +188,7 @@ jobs: postgres: name: Tests - DB [PostgreSQL] runs-on: ubuntu-20.04 - needs: [ 'pep_style', 'pre-commit' ] + needs: [ 'pre-commit' ] env: INVENTREE_DB_ENGINE: django.db.backends.postgresql @@ -264,7 +232,7 @@ jobs: name: Tests - DB [MySQL] runs-on: ubuntu-20.04 - needs: [ 'pep_style', 'pre-commit' ] + needs: [ 'pre-commit' ] env: # Database backend configuration diff --git a/requirements-dev.in b/requirements-dev.in index 50f25f136c..1392a8a05c 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -5,10 +5,7 @@ coveralls==2.1.2 # Coveralls linking (for tracking covera django-debug-toolbar # Debug / profiling toolbar django-slowtests # Show which unit tests are running slowly django-test-migrations # Unit testing for database migrations -flake8 # PEP checking -flake8-docstrings # docstring format testing isort # python import sorting -pep8-naming # PEP naming convention extension pip-tools # Compile pip requirements pre-commit # Git pre-commit setuptools # Standard dependency diff --git a/requirements-dev.txt b/requirements-dev.txt index 8409bb3757..6ce120a73f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -54,13 +54,6 @@ docopt==0.6.2 # via coveralls filelock==3.13.1 # via virtualenv -flake8==6.1.0 - # via - # -r requirements-dev.in - # flake8-docstrings - # pep8-naming -flake8-docstrings==1.7.0 - # via -r requirements-dev.in identify==2.5.31 # via pre-commit idna==3.4 @@ -73,8 +66,6 @@ importlib-metadata==6.8.0 # build isort==5.12.0 # via -r requirements-dev.in -mccabe==0.7.0 - # via flake8 nodeenv==1.8.0 # via pre-commit packaging==23.2 @@ -91,16 +82,10 @@ platformdirs==3.11.0 # via virtualenv pre-commit==3.5.0 # via -r requirements-dev.in -pycodestyle==2.11.1 - # via flake8 pycparser==2.21 # via # -c requirements.txt # cffi -pydocstyle==6.3.0 - # via flake8-docstrings -pyflakes==3.1.0 - # via flake8 pyproject-hooks==1.0.0 # via build pytz==2023.3.post1 @@ -115,8 +100,6 @@ requests==2.31.0 # via # -c requirements.txt # coveralls -snowballstemmer==2.2.0 - # via pydocstyle sqlparse==0.4.4 # via # -c requirements.txt