diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d3073642..fbd1bfe7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,7 +44,13 @@ repos: rev: 7.1.1 hooks: - id: flake8 - exclude: "testdata" + exclude: | + (?x)^( + .*/testdata/.* + |.*/testpath/.* + |tests/tools/pylint/test_no_init_found/.* + |tests/test_message\.py + )$ args: - --max-line-length=120 - repo: https://github.com/PyCQA/isort diff --git a/poetry.lock b/poetry.lock index 47a2064a..f3b146b8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "astroid" @@ -1826,4 +1826,4 @@ with-vulture = ["vulture"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "c307a3a29e1e8760841d5af9bbb07bdb1cde719ca0601c46b36a8caff90d2c25" +content-hash = "de3329503e452b1ca74073fa9893ebfe6cb6812c92c6d7ace32fb5e46652df4e" diff --git a/prospector/config/configuration.py b/prospector/config/configuration.py index c4fe2b0f..db0df3e1 100644 --- a/prospector/config/configuration.py +++ b/prospector/config/configuration.py @@ -1,4 +1,3 @@ -# flake8: noqa import importlib.metadata import setoptconf as soc diff --git a/pyproject.toml b/pyproject.toml index 99ca82de..21e34678 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,6 @@ pylint-flask = "0.6" requirements-detector = ">=1.3.1" PyYAML = "*" mccabe = "^0.7.0" -flake8 = "*" pyflakes = ">=2.2.0" pycodestyle = ">=2.9.0" pep8-naming = ">=0.3.3,<=0.10.0" diff --git a/tests/execution/testdata/test_errors_found/__init__.py b/tests/execution/testdata/test_errors_found/__init__.py index 59834e6d..9ea9a5aa 100644 --- a/tests/execution/testdata/test_errors_found/__init__.py +++ b/tests/execution/testdata/test_errors_found/__init__.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/execution/testdata/test_errors_found/file1.py b/tests/execution/testdata/test_errors_found/file1.py index 59834e6d..9ea9a5aa 100644 --- a/tests/execution/testdata/test_errors_found/file1.py +++ b/tests/execution/testdata/test_errors_found/file1.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/execution/testdata/test_errors_found/pkg/__init__.py b/tests/execution/testdata/test_errors_found/pkg/__init__.py index 59834e6d..9ea9a5aa 100644 --- a/tests/execution/testdata/test_errors_found/pkg/__init__.py +++ b/tests/execution/testdata/test_errors_found/pkg/__init__.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/execution/testdata/test_errors_found/pkg/file2.py b/tests/execution/testdata/test_errors_found/pkg/file2.py index 59834e6d..9ea9a5aa 100644 --- a/tests/execution/testdata/test_errors_found/pkg/file2.py +++ b/tests/execution/testdata/test_errors_found/pkg/file2.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/execution/testdata/test_errors_found/pkg2/file3.py b/tests/execution/testdata/test_errors_found/pkg2/file3.py index 59834e6d..9ea9a5aa 100644 --- a/tests/execution/testdata/test_errors_found/pkg2/file3.py +++ b/tests/execution/testdata/test_errors_found/pkg2/file3.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/suppression/test_suppression.py b/tests/suppression/test_suppression.py index b686f93d..cc2635c6 100644 --- a/tests/suppression/test_suppression.py +++ b/tests/suppression/test_suppression.py @@ -20,7 +20,7 @@ def test_ignore_file(self): def test_ignore_lines(self): file_contents = self._get_file_contents("test_ignore_lines/test.py") _, lines = get_noqa_suppressions(file_contents) - self.assertSetEqual({2, 3, 4}, lines) + self.assertSetEqual({1, 2, 3}, lines) def test_ignore_enum_error(self): file_contents = self._get_file_contents("test_ignore_enum/test.py") diff --git a/tests/suppression/testdata/test_ignore_lines/test.py b/tests/suppression/testdata/test_ignore_lines/test.py index c84c8a38..024daba1 100644 --- a/tests/suppression/testdata/test_ignore_lines/test.py +++ b/tests/suppression/testdata/test_ignore_lines/test.py @@ -1,4 +1,3 @@ -# flake8: noqa import collections # NOQA import os # noqa import tempfile # noqa diff --git a/tests/test_message.py b/tests/test_message.py index c798be48..2577f82c 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -1,4 +1,3 @@ -# flake8: noqa from pathlib import Path from unittest import TestCase diff --git a/tests/tools/bandit/testpath/testfile.py b/tests/tools/bandit/testpath/testfile.py index 2dcbacea..914fd7ed 100644 --- a/tests/tools/bandit/testpath/testfile.py +++ b/tests/tools/bandit/testpath/testfile.py @@ -1,4 +1,3 @@ -# flake8: noqa def someFunction(user, password="Admin"): print("Hi " + user) diff --git a/tests/tools/pycodestyle/testpath/test_space_tab.py b/tests/tools/pycodestyle/testpath/test_space_tab.py index 8efa4a9d..2e77d90c 100644 --- a/tests/tools/pycodestyle/testpath/test_space_tab.py +++ b/tests/tools/pycodestyle/testpath/test_space_tab.py @@ -1,5 +1,4 @@ # fmt: off -# flake8: noqa for a in "abc": a == 1 # indented with 8 spaces for b in "xyz": diff --git a/tests/tools/pylint/test_no_init_found/__init__.py b/tests/tools/pylint/test_no_init_found/__init__.py index 59834e6d..9ea9a5aa 100644 --- a/tests/tools/pylint/test_no_init_found/__init__.py +++ b/tests/tools/pylint/test_no_init_found/__init__.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/tools/pylint/test_no_init_found/file1.py b/tests/tools/pylint/test_no_init_found/file1.py index 59834e6d..9ea9a5aa 100644 --- a/tests/tools/pylint/test_no_init_found/file1.py +++ b/tests/tools/pylint/test_no_init_found/file1.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/tools/pylint/test_no_init_found/pkg/__init__.py b/tests/tools/pylint/test_no_init_found/pkg/__init__.py index 59834e6d..9ea9a5aa 100644 --- a/tests/tools/pylint/test_no_init_found/pkg/__init__.py +++ b/tests/tools/pylint/test_no_init_found/pkg/__init__.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/tools/pylint/test_no_init_found/pkg/file2.py b/tests/tools/pylint/test_no_init_found/pkg/file2.py index 59834e6d..9ea9a5aa 100644 --- a/tests/tools/pylint/test_no_init_found/pkg/file2.py +++ b/tests/tools/pylint/test_no_init_found/pkg/file2.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/tools/pylint/test_no_init_found/pkg2/file3.py b/tests/tools/pylint/test_no_init_found/pkg2/file3.py index 59834e6d..9ea9a5aa 100644 --- a/tests/tools/pylint/test_no_init_found/pkg2/file3.py +++ b/tests/tools/pylint/test_no_init_found/pkg2/file3.py @@ -1,2 +1 @@ -# flake8: noqa x = y + 1 diff --git a/tests/tools/vulture/testpath/testfile.py b/tests/tools/vulture/testpath/testfile.py index 5cead6dc..34bdfe11 100644 --- a/tests/tools/vulture/testpath/testfile.py +++ b/tests/tools/vulture/testpath/testfile.py @@ -1,4 +1,3 @@ -# flake8: noqa import os