mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
* Remove compatibility aliases Remove a few instances of Text Use aliases from _typeshed * Remove unused imports
15 lines
494 B
Python
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]]]
|