Address cyclic-import.

This commit is contained in:
Felix Fontein 2025-10-07 17:45:38 +02:00
parent db09affaea
commit 5de721bf3b
2 changed files with 2 additions and 3 deletions

View File

@ -391,7 +391,6 @@ disable=raw-checker-failed,
consider-using-in, consider-using-in,
consider-using-max-builtin, consider-using-max-builtin,
consider-using-with, consider-using-with,
cyclic-import,
fixme, fixme,
function-redefined, function-redefined,
import-error, import-error,

View File

@ -86,13 +86,13 @@ except ImportError:
def fail_on_missing_imports(): def fail_on_missing_imports():
if REQUESTS_IMPORT_ERROR is not None: if REQUESTS_IMPORT_ERROR is not None:
from .errors import MissingRequirementException from .errors import MissingRequirementException # pylint: disable=cyclic-import
raise MissingRequirementException( raise MissingRequirementException(
"You have to install requests", "requests", REQUESTS_IMPORT_ERROR "You have to install requests", "requests", REQUESTS_IMPORT_ERROR
) )
if URLLIB3_IMPORT_ERROR is not None: if URLLIB3_IMPORT_ERROR is not None:
from .errors import MissingRequirementException from .errors import MissingRequirementException # pylint: disable=cyclic-import
raise MissingRequirementException( raise MissingRequirementException(
"You have to install urllib3", "urllib3", URLLIB3_IMPORT_ERROR "You have to install urllib3", "urllib3", URLLIB3_IMPORT_ERROR