Skip to content

Commit 53b64d1

Browse files
Drop 'LOAD_CONFIGURATION_SUPPORTED' since we don't support pylint <2.3
1 parent 12a2c91 commit 53b64d1

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

pylint_django/checkers/migrations.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from pylint.checkers.utils import only_required_for_messages
1414
from pylint_plugin_utils import suppress_message
1515

16-
from pylint_django import compat
1716
from pylint_django.__pkginfo__ import BASE_ID
1817
from pylint_django.utils import is_migrations_module
1918

@@ -165,8 +164,6 @@ def register(linter):
165164
"""Required method to auto register this checker."""
166165
linter.register_checker(NewDbFieldWithDefaultChecker(linter))
167166
linter.register_checker(MissingBackwardsMigrationChecker(linter))
168-
if not compat.LOAD_CONFIGURATION_SUPPORTED:
169-
load_configuration(linter)
170167

171168
# apply augmentations for migration checkers
172169
# Unused arguments for migrations

pylint_django/compat.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,5 @@
1212
from astroid.nodes import Function as FunctionDef
1313
from astroid.nodes import Getattr as Attribute
1414

15-
import pylint
16-
17-
# pylint before version 2.3 does not support load_configuration() hook.
18-
LOAD_CONFIGURATION_SUPPORTED = False
19-
try:
20-
LOAD_CONFIGURATION_SUPPORTED = tuple(pylint.__version__.split(".")) >= ("2", "3")
21-
except AttributeError:
22-
LOAD_CONFIGURATION_SUPPORTED = pylint.__pkginfo__.numversion >= (2, 3)
23-
2415
# datetime module is compiled and moved to _pydatetime
2516
COMPILED_DATETIME_CLASSES = sys.version_info >= (3, 12)

pylint_django/plugin.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# we want to import the transforms to make sure they get added to the astroid manager,
44
# however we don't actually access them directly, so we'll disable the warning
5-
from pylint_django import compat
65
from pylint_django.checkers import register_checkers
76

87

@@ -43,6 +42,3 @@ def register(linter):
4342
# probably trying to execute pylint_django when Django isn't installed
4443
# in this case the django-not-installed checker will kick-in
4544
pass
46-
47-
if not compat.LOAD_CONFIGURATION_SUPPORTED:
48-
load_configuration(linter)

0 commit comments

Comments
 (0)