Skip to content

Commit 5fdfa2f

Browse files
committed
[#430] Fixing reference to linter config object (which moved between pylint versions I believe)
1 parent 3527105 commit 5fdfa2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pylint_django/checkers/foreign_key_strings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def open(self):
9595
# TODO: remove this no-member ignore : this is to avoid the missing `config` for pylint 3+,
9696
# and can be removed once pylint 2
9797
# pylint: disable=no-member
98-
django_settings_module = self.config.django_settings_module
98+
django_settings_module = self.linter.config.django_settings_module
9999

100100
if django_settings_module is None:
101101
# we will warn the user that they haven't actually configured Django themselves
@@ -117,7 +117,7 @@ def open(self):
117117
# at least here it is a fatal error so we can just raise this immediately
118118
self.add_message(
119119
"django-settings-module-not-found",
120-
args=self.config.django_settings_module,
120+
args=self.linter.config.django_settings_module,
121121
)
122122
# however we'll trundle on with basic settings
123123
from django.conf import settings # pylint: disable=import-outside-toplevel

0 commit comments

Comments
 (0)