1 from _typeshed import StrPath
2 from typing import Any, BinaryIO, Callable, Protocol, overload
4 class _ReadableBinary(Protocol):
5 def tell(self) -> int: ...
6 def read(self, size: int) -> bytes: ...
7 def seek(self, offset: int) -> Any: ...
10 def what(file: StrPath | _ReadableBinary, h: None = ...) -> str | None: ...
12 def what(file: Any, h: bytes) -> str | None: ...
14 tests: list[Callable[[bytes, BinaryIO | None], str | None]]