Files
django-stubs/django/core/files/base.pyi
Maxim Kurnikov a9f215bf64 initial commit
2018-07-29 18:12:23 +03:00

36 lines
961 B
Python

from typing import (
Any,
Iterator,
Optional,
Union,
)
def endswith_cr(line: bytes) -> bool: ...
def endswith_lf(line: Union[str, bytes]) -> bool: ...
def equals_lf(line: bytes) -> bool: ...
class ContentFile:
def __bool__(self) -> bool: ...
def __init__(self, content: Union[str, bytes], name: Optional[str] = ...) -> None: ...
def close(self) -> None: ...
class File:
def __bool__(self) -> bool: ...
def __enter__(self) -> File: ...
def __exit__(self, exc_type: None, exc_value: None, tb: None) -> None: ...
def __init__(self, file: Any, name: Optional[str] = ...) -> None: ...
def __iter__(self) -> Iterator[Union[str, bytes]]: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def chunks(self, chunk_size: None = ...) -> Iterator[Union[str, bytes]]: ...
def close(self) -> None: ...
@cached_property
def size(self) -> int: ...