diff --git a/django-stubs/core/files/storage/__init__.pyi b/django-stubs/core/files/storage/__init__.pyi index 6759361da..abd413d8b 100644 --- a/django-stubs/core/files/storage/__init__.pyi +++ b/django-stubs/core/files/storage/__init__.pyi @@ -24,4 +24,5 @@ def get_storage_class(import_path: str | None = ...) -> type[Storage]: ... class DefaultStorage(LazyObject): ... storages: StorageHandler -default_storage: DefaultStorage +# default_storage is actually an instance of DefaultStorage, but it proxies through to a Storage +default_storage: Storage diff --git a/scripts/stubtest/allowlist.txt b/scripts/stubtest/allowlist.txt index 7258cc982..c4e2afa65 100644 --- a/scripts/stubtest/allowlist.txt +++ b/scripts/stubtest/allowlist.txt @@ -14,6 +14,9 @@ django.contrib.auth.migrations.* django.contrib.flatpages.migrations.* django.contrib.contenttypes.migrations.* +# default_storage is actually an instance of DefaultStorage, but it proxies through to a Storage +django.core.files.storage.default_storage + # BaseArchive abstract methods that take no argument, but typed with arguments to match the Archive and TarArchive Implementations django.utils.archive.BaseArchive.list django.utils.archive.BaseArchive.extract