Skip to content

Commit 05ccb0a

Browse files
[ruff] Add flake8-pie, flake8-pyi, pygrep-hooks, future annotations
1 parent 559d9b0 commit 05ccb0a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

pylint_django/checkers/foreign_key_strings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ def open(self):
8383
import django # pylint: disable=import-outside-toplevel
8484

8585
django.setup()
86-
from django.apps import apps # noqa pylint: disable=import-outside-toplevel,unused-import
86+
# pylint: disable-next=import-outside-toplevel,unused-import
87+
from django.apps import apps # noqa: F401
8788

8889
except ImproperlyConfigured:
8990
# this means that Django wasn't able to configure itself using some defaults

pylint_django/tests/test_func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, test_file):
5454
# if hasattr(test_file, 'option_file') and test_file.option_file is None:
5555
# pylint: disable=super-with-arguments
5656
# TODO Fix this and the CI (?)
57-
super(PylintDjangoLintModuleTest, self).__init__(test_file) # noqa
57+
super(PylintDjangoLintModuleTest, self).__init__(test_file) # noqa: UP008
5858
self._linter.load_plugin_modules(["pylint_django"])
5959
self._linter.load_plugin_configuration()
6060

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@ lint.select = [
7070
"B", # bugbear
7171
"E", # pycodestyle
7272
"F", # pyflakes
73+
"FA100", # add future annotations
7374
"I", # isort
75+
"PGH004", # pygrep-hooks - Use specific rule codes when using noqa
76+
"PIE", # flake8-pie
7477
"PLR1714", # Consider merging multiple comparisons
78+
"PYI", # flake8-pyi
7579
"RUF", # ruff
80+
"T100", # flake8-debugger
7681
"UP", # pyupgrade
7782
"W", # pycodestyle
7883
]

0 commit comments

Comments
 (0)