Skip to content

Commit

Permalink
fix: Resolve pylint plugin issue caused by pylint update
Browse files Browse the repository at this point in the history
  • Loading branch information
mfarhan943 committed Oct 24, 2024
1 parent 9004a03 commit 08aeb96
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pylint_django_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from pylint_django.checkers import ForeignKeyStringsChecker
from pylint_plugin_utils import get_checker
import sys


class ArgumentCompatibilityError(Exception):
Expand Down Expand Up @@ -47,6 +46,5 @@ def load_configuration(linter):
"""
Configures the Django settings module based on the command-line arguments passed to pylint.
"""
name_checker = get_checker(linter, ForeignKeyStringsChecker)
arguments = linter.cmdline_parser.parse_args()[1]
name_checker.config.django_settings_module = _get_django_settings_module(arguments)
arguments = sys.argv[1:]
linter.config.django_settings_module = _get_django_settings_module(arguments)

0 comments on commit 08aeb96

Please sign in to comment.