@@ -80,19 +80,15 @@ def open(self):
80
80
# state is stashed in this property.
81
81
82
82
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
86
84
except ModuleNotFoundError :
87
85
return
88
86
89
87
try :
90
88
import django # pylint: disable=import-outside-toplevel
91
89
92
90
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
96
92
97
93
# flake8: noqa=F401, F403
98
94
except ImproperlyConfigured :
@@ -103,19 +99,14 @@ def open(self):
103
99
# we will warn the user that they haven't actually configured Django themselves
104
100
self ._raise_warning = True
105
101
# 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
109
103
110
104
settings .configure ()
111
105
django .setup ()
112
106
else :
113
107
# see if we can load the provided settings module
114
108
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
119
110
120
111
settings .configure (Settings (self .config .django_settings_module ))
121
112
django .setup ()
@@ -127,9 +118,7 @@ def open(self):
127
118
args = self .config .django_settings_module ,
128
119
)
129
120
# 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
133
122
134
123
settings .configure ()
135
124
django .setup ()
0 commit comments