Skip to content

Commit

Permalink
[ruff] Add flake8-pie, flake8-pyi, pygrep-hooks, future annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Oct 9, 2024
1 parent 559d9b0 commit 05ccb0a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pylint_django/checkers/foreign_key_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def open(self):
import django # pylint: disable=import-outside-toplevel

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

except ImproperlyConfigured:
# this means that Django wasn't able to configure itself using some defaults
Expand Down
2 changes: 1 addition & 1 deletion pylint_django/tests/test_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, test_file):
# if hasattr(test_file, 'option_file') and test_file.option_file is None:
# pylint: disable=super-with-arguments
# TODO Fix this and the CI (?)
super(PylintDjangoLintModuleTest, self).__init__(test_file) # noqa
super(PylintDjangoLintModuleTest, self).__init__(test_file) # noqa: UP008
self._linter.load_plugin_modules(["pylint_django"])
self._linter.load_plugin_configuration()

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@ lint.select = [
"B", # bugbear
"E", # pycodestyle
"F", # pyflakes
"FA100", # add future annotations
"I", # isort
"PGH004", # pygrep-hooks - Use specific rule codes when using noqa
"PIE", # flake8-pie
"PLR1714", # Consider merging multiple comparisons
"PYI", # flake8-pyi
"RUF", # ruff
"T100", # flake8-debugger
"UP", # pyupgrade
"W", # pycodestyle
]
Expand Down

0 comments on commit 05ccb0a

Please sign in to comment.