Files
typeshed/stdlib/imghdr.pyi
Sebastian Rittau 841a365284 Remove compatibility aliases (#5464)
* Remove compatibility aliases

Remove a few instances of Text

Use aliases from _typeshed

* Remove unused imports
2021-05-15 20:49:20 +03:00

15 lines
494 B
Python

from _typeshed import StrPath
from typing import Any, BinaryIO, Callable, List, Optional, Protocol, Union, overload
class _ReadableBinary(Protocol):
def tell(self) -> int: ...
def read(self, size: int) -> bytes: ...
def seek(self, offset: int) -> Any: ...
@overload
def what(file: Union[StrPath, _ReadableBinary], h: None = ...) -> Optional[str]: ...
@overload
def what(file: Any, h: bytes) -> Optional[str]: ...
tests: List[Callable[[bytes, Optional[BinaryIO]], Optional[str]]]