mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-23 06:17:09 +08:00
Disable fallback to runtime types for Django settings (#1163)
This fallback to value.__class__ seems to be doing more harm than good; see #312 and #1162. Replace it with a clear error message that suggests a way to fix the problem rather than incompletely papering over it. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
1 parent
02999f3e86
commit
9bd8aed1e1
2 files changed
+10
-14
No files matched your search
@@ -62,7 +62,7 @@ def initialize_django(settings_module: str) -> Tuple["Apps", "LazySettings"]:
|
||||
apps.get_swappable_settings_name.cache_clear() # type: ignore
|
||||
|
||||
if not settings.configured:
|
||||
settings._setup()
|
||||
settings._setup() # type: ignore
|
||||
|
||||
apps.populate(settings.INSTALLED_APPS)
|
||||
|
||||
|
||||
Reference in new issue
Block a user