From f6d19171d531df5829ce3853721d3547812c636e Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 3 Oct 2023 14:02:09 +0200 Subject: [PATCH] Use flake8 directly instead of unmaintained pytest plugin The plugin isn't compatible to newer flake8 versions but doesn't seem to be maintained. So just directly call flake8. --- .flake8 | 6 ++++++ .github/workflows/ci.yml | 2 ++ pytest.ini | 8 +------- requirements-tests.txt | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..e140f6d --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +per-file-ignores = + */migrations/* ALL + */tests/* ALL + __init__.py F401 F403 +max-line-length = 109 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5b9272..65d22e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,8 @@ jobs: pip install -r requirements-tests.txt - name: Run unit tests run: ./runtests.py --no-cov --no-vici + - name: Run flake8 + run: flake8 strongMan/ docker: runs-on: ubuntu-latest diff --git a/pytest.ini b/pytest.ini index a0f7458..2e62b41 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,11 +1,5 @@ [pytest] -addopts = --tb=short --flake8 +addopts = --tb=short filterwarnings = error - ignore:SelectableGroups dict interface is deprecated::flake8 ignore:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning -flake8-ignore = - */migrations/* ALL - */tests/* ALL - __init__.py F401 F403 -flake8-max-line-length = 109 diff --git a/requirements-tests.txt b/requirements-tests.txt index 39d6726..10cb956 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,5 +1,5 @@ -r requirements.txt +flake8 pytest==7.4.2 pytest-django==4.1.0 -pytest-flake8==1.0.7 coverage==5.3.1