Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

storage: Fix type annotation of content.

Zixuan James Li01d3df0551a7
diff --git a/zerver/lib/storage.py b/zerver/lib/storage.py
index 2fef2a09288..d033813b4e6 100644
--- a/zerver/lib/storage.py
+++ b/zerver/lib/storage.py
@@ -6,6 +6,7 @@ from typing import Optional
from django.conf import settings
from django.contrib.staticfiles.storage import ManifestStaticFilesStorage
+from django.core.files.base import File
from django.core.files.storage import FileSystemStorage
if settings.DEBUG:
@@ -22,7 +23,7 @@ else:
class IgnoreBundlesManifestStaticFilesStorage(ManifestStaticFilesStorage):
def hashed_name(
- self, name: str, content: Optional[str] = None, filename: Optional[str] = None
+ self, name: str, content: Optional["File[bytes]"] = None, filename: Optional[str] = None
) -> str:
ext = os.path.splitext(name)[1]
if name.startswith("webpack-bundles"):