better stubs

This commit is contained in:
Maxim Kurnikov
2018-08-05 03:13:19 +03:00
parent 4013fe4d03
commit fa718b8e55
380 changed files with 11805 additions and 8503 deletions

View 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: ...