From 6972c753a193d36c50ad39d49bea7ccc128b2761 Mon Sep 17 00:00:00 2001 From: Alexandre Spaeth Date: Mon, 5 Jun 2023 11:40:52 -0700 Subject: [PATCH 1/2] Add ManifestStaticFilesStorage new parameters --- django-stubs/contrib/staticfiles/storage.pyi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/django-stubs/contrib/staticfiles/storage.pyi b/django-stubs/contrib/staticfiles/storage.pyi index 0098153f9..6fdf6585f 100644 --- a/django-stubs/contrib/staticfiles/storage.pyi +++ b/django-stubs/contrib/staticfiles/storage.pyi @@ -20,6 +20,7 @@ class StaticFilesStorage(FileSystemStorage): class HashedFilesMixin: default_template: str max_post_process_passes: int + support_js_module_import_aggregation: bool patterns: Any hashed_files: Any keep_intermediate_files: bool @@ -38,11 +39,14 @@ class ManifestFilesMixin(HashedFilesMixin): manifest_name: str manifest_strict: bool keep_intermediate_files: bool + manifest_storage: Storage | None def __init__(self, *args: Any, **kwargs: Any) -> None: ... def read_manifest(self) -> str: ... def load_manifest(self) -> dict[str, Any]: ... def save_manifest(self) -> None: ... + hashed_files: dict[str, str] def post_process(self, *args: Any, **kwargs: Any) -> _PostProcessT: ... + manifest_hash: str def stored_name(self, name: str) -> str: ... class ManifestStaticFilesStorage(ManifestFilesMixin, StaticFilesStorage): ... # type: ignore From 888d5f2a02eda4d23882a9941d60900044967fde Mon Sep 17 00:00:00 2001 From: Alexandre Spaeth Date: Mon, 5 Jun 2023 12:29:14 -0700 Subject: [PATCH 2/2] Move props to top of class --- django-stubs/contrib/staticfiles/storage.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django-stubs/contrib/staticfiles/storage.pyi b/django-stubs/contrib/staticfiles/storage.pyi index 6fdf6585f..b38491814 100644 --- a/django-stubs/contrib/staticfiles/storage.pyi +++ b/django-stubs/contrib/staticfiles/storage.pyi @@ -40,13 +40,13 @@ class ManifestFilesMixin(HashedFilesMixin): manifest_strict: bool keep_intermediate_files: bool manifest_storage: Storage | None + hashed_files: dict[str, str] + manifest_hash: str def __init__(self, *args: Any, **kwargs: Any) -> None: ... def read_manifest(self) -> str: ... def load_manifest(self) -> dict[str, Any]: ... def save_manifest(self) -> None: ... - hashed_files: dict[str, str] def post_process(self, *args: Any, **kwargs: Any) -> _PostProcessT: ... - manifest_hash: str def stored_name(self, name: str) -> str: ... class ManifestStaticFilesStorage(ManifestFilesMixin, StaticFilesStorage): ... # type: ignore