Skip to content

Commit

Permalink
django.core.files.storage: Improvements (#243)
Browse files Browse the repository at this point in the history
- `Storage`: `url()` only accepts a string as a parameter.
- `default_storage`: instance of `Storage` as far as usage is concerned.
  • Loading branch information
noelleleigh authored May 17, 2024
1 parent b0d7081 commit bc715bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django-stubs/core/files/storage.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Storage:
def exists(self, name: str) -> bool: ...
def listdir(self, path: str) -> tuple[list[str], list[str]]: ...
def size(self, name: str) -> int: ...
def url(self, name: str | None) -> str: ...
def url(self, name: str) -> str: ...
def get_accessed_time(self, name: str) -> datetime: ...
def get_created_time(self, name: str) -> datetime: ...
def get_modified_time(self, name: str) -> datetime: ...
Expand All @@ -44,6 +44,6 @@ class FileSystemStorage(Storage):

class DefaultStorage(LazyObject): ...

default_storage: Any
default_storage: Storage

def get_storage_class(import_path: str | None = ...) -> type[Storage]: ...

0 comments on commit bc715bb

Please sign in to comment.