We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bc44a6 commit 0a9cb12Copy full SHA for 0a9cb12
pylint_django/checkers/foreign_key_strings.py
@@ -78,9 +78,12 @@ def open(self):
78
# must wait until some module is inspected to be able to raise... so that
79
# state is stashed in this property.
80
81
- from django.core.exceptions import ( # pylint: disable=import-outside-toplevel
82
- ImproperlyConfigured,
83
- )
+ try:
+ from django.core.exceptions import ( # pylint: disable=import-outside-toplevel
+ ImproperlyConfigured,
84
+ )
85
+ except ModuleNotFoundError:
86
+ return
87
88
try:
89
import django # pylint: disable=import-outside-toplevel
0 commit comments