massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / imghdr.pyi
1 from _typeshed import StrPath
2 from typing import Any, BinaryIO, Callable, Protocol, overload
3
4 class _ReadableBinary(Protocol):
5     def tell(self) -> int: ...
6     def read(self, size: int) -> bytes: ...
7     def seek(self, offset: int) -> Any: ...
8
9 @overload
10 def what(file: StrPath | _ReadableBinary, h: None = ...) -> str | None: ...
11 @overload
12 def what(file: Any, h: bytes) -> str | None: ...
13
14 tests: list[Callable[[bytes, BinaryIO | None], str | None]]