mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 19:01:16 +08:00
better stubs
This commit is contained in:
19
django-stubs/core/files/images.pyi
Normal file
19
django-stubs/core/files/images.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from io import BufferedReader, BytesIO
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
from django.core.files import File
|
||||
|
||||
|
||||
class ImageFile(File):
|
||||
file: _io.BufferedReader
|
||||
mode: str
|
||||
name: str
|
||||
@property
|
||||
def width(self) -> int: ...
|
||||
@property
|
||||
def height(self) -> int: ...
|
||||
|
||||
def get_image_dimensions(
|
||||
file_or_path: Union[BytesIO, BufferedReader, str, ImageFile],
|
||||
close: bool = ...,
|
||||
) -> Any: ...
|
||||
Reference in New Issue
Block a user