From 08aeb9691e5b3d10c23eaf2a0cf4098268f26c5c Mon Sep 17 00:00:00 2001 From: Muhammad Farhan Date: Thu, 24 Oct 2024 11:53:32 +0500 Subject: [PATCH] fix: Resolve pylint plugin issue caused by pylint update --- pylint_django_settings.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pylint_django_settings.py b/pylint_django_settings.py index 46abfd81f883..31120c69efa9 100644 --- a/pylint_django_settings.py +++ b/pylint_django_settings.py @@ -1,5 +1,4 @@ -from pylint_django.checkers import ForeignKeyStringsChecker -from pylint_plugin_utils import get_checker +import sys class ArgumentCompatibilityError(Exception): @@ -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)