from io import BufferedReader, StringIO from typing import Any, Iterator, Optional, Union from django.core.files.utils import FileProxyMixin class File(FileProxyMixin): DEFAULT_CHUNK_SIZE: Any = ... file: StringIO = ... name: Optional[str] = ... mode: str = ... def __init__(self, file: Any, name: Optional[str] = ...) -> None: ... def __bool__(self) -> bool: ... def __len__(self) -> int: ... def size(self) -> int: ... def chunks( self, chunk_size: Optional[int] = ... ) -> Iterator[Union[bytes, bytearray]]: ... def multiple_chunks(self, chunk_size: Optional[Any] = ...): ... def __iter__(self) -> Iterator[Union[bytes, str]]: ... def __enter__(self) -> File: ... def __exit__(self, exc_type: None, exc_value: None, tb: None) -> None: ... def open(self, mode: Optional[str] = ...) -> File: ... def close(self) -> None: ... class ContentFile(File): file: StringIO size: Any = ... def __init__( self, content: Union[bytes, str], name: Optional[str] = ... ) -> None: ... def __bool__(self) -> bool: ... def open(self, mode: Optional[str] = ...) -> ContentFile: ... def close(self) -> None: ... def write(self, data: str) -> int: ... def endswith_cr(line: bytes) -> bool: ... def endswith_lf(line: Union[bytes, str]) -> bool: ... def equals_lf(line: bytes) -> bool: ...