Skip to content

Commit

Permalink
Remove flake8 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Oct 19, 2024
1 parent 80c2cb0 commit 655cff1
Show file tree
Hide file tree
Showing 20 changed files with 10 additions and 21 deletions.
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion prospector/config/configuration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# flake8: noqa
import importlib.metadata

import setoptconf as soc
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion tests/execution/testdata/test_errors_found/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/execution/testdata/test_errors_found/file1.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/execution/testdata/test_errors_found/pkg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/execution/testdata/test_errors_found/pkg/file2.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/execution/testdata/test_errors_found/pkg2/file3.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
2 changes: 1 addition & 1 deletion tests/suppression/test_suppression.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 0 additions & 1 deletion tests/suppression/testdata/test_ignore_lines/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# flake8: noqa
import collections # NOQA
import os # noqa
import tempfile # noqa
1 change: 0 additions & 1 deletion tests/test_message.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# flake8: noqa
from pathlib import Path
from unittest import TestCase

Expand Down
1 change: 0 additions & 1 deletion tests/tools/bandit/testpath/testfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# flake8: noqa
def someFunction(user, password="Admin"):
print("Hi " + user)

Expand Down
1 change: 0 additions & 1 deletion tests/tools/pycodestyle/testpath/test_space_tab.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# fmt: off
# flake8: noqa
for a in "abc":
a == 1 # indented with 8 spaces
for b in "xyz":
Expand Down
1 change: 0 additions & 1 deletion tests/tools/pylint/test_no_init_found/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/tools/pylint/test_no_init_found/file1.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/tools/pylint/test_no_init_found/pkg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/tools/pylint/test_no_init_found/pkg/file2.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/tools/pylint/test_no_init_found/pkg2/file3.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# flake8: noqa
x = y + 1
1 change: 0 additions & 1 deletion tests/tools/vulture/testpath/testfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# flake8: noqa
import os


Expand Down

0 comments on commit 655cff1

Please sign in to comment.