@@ -80,19 +80,15 @@ def open(self):
8080 # state is stashed in this property.
8181
8282 try :
83- from django .core .exceptions import ( # pylint: disable=import-outside-toplevel
84- ImproperlyConfigured ,
85- )
83+ from django .core .exceptions import ImproperlyConfigured # pylint: disable=import-outside-toplevel
8684 except ModuleNotFoundError :
8785 return
8886
8987 try :
9088 import django # pylint: disable=import-outside-toplevel
9189
9290 django .setup ()
93- from django .apps import ( # noqa pylint: disable=import-outside-toplevel,unused-import
94- apps ,
95- )
91+ from django .apps import apps # noqa pylint: disable=import-outside-toplevel,unused-import
9692
9793 # flake8: noqa=F401, F403
9894 except ImproperlyConfigured :
@@ -103,19 +99,14 @@ def open(self):
10399 # we will warn the user that they haven't actually configured Django themselves
104100 self ._raise_warning = True
105101 # but use django defaults then...
106- from django .conf import ( # pylint: disable=import-outside-toplevel
107- settings ,
108- )
102+ from django .conf import settings # pylint: disable=import-outside-toplevel
109103
110104 settings .configure ()
111105 django .setup ()
112106 else :
113107 # see if we can load the provided settings module
114108 try :
115- from django .conf import ( # pylint: disable=import-outside-toplevel
116- Settings ,
117- settings ,
118- )
109+ from django .conf import Settings , settings # pylint: disable=import-outside-toplevel
119110
120111 settings .configure (Settings (self .config .django_settings_module ))
121112 django .setup ()
@@ -127,9 +118,7 @@ def open(self):
127118 args = self .config .django_settings_module ,
128119 )
129120 # however we'll trundle on with basic settings
130- from django .conf import ( # pylint: disable=import-outside-toplevel
131- settings ,
132- )
121+ from django .conf import settings # pylint: disable=import-outside-toplevel
133122
134123 settings .configure ()
135124 django .setup ()
0 commit comments