From ae524f3beb726c5c7ae506f8741277c31f8a923a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Sat, 2 Apr 2022 09:16:48 +0200 Subject: Use the ``argparse`` config handler in ``imports.py`` --- pylint/utils/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pylint/utils/utils.py') diff --git a/pylint/utils/utils.py b/pylint/utils/utils.py index 1bb0c9130..90a082daf 100644 --- a/pylint/utils/utils.py +++ b/pylint/utils/utils.py @@ -11,6 +11,7 @@ except ImportError: # isort < 5 HAS_ISORT_5 = False +import argparse import codecs import os import re @@ -382,7 +383,7 @@ def _ini_format(stream: TextIO, options: List[Tuple]) -> None: class IsortDriver: """A wrapper around isort API that changed between versions 4 and 5.""" - def __init__(self, config) -> None: + def __init__(self, config: argparse.Namespace) -> None: if HAS_ISORT_5: self.isort5_config = isort.api.Config( # There is no typo here. EXTRA_standard_library is -- cgit v1.2.1