mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Remove compatibility aliases (#5464)
* Remove compatibility aliases Remove a few instances of Text Use aliases from _typeshed * Remove unused imports
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import os
|
||||
from typing import Any, BinaryIO, Callable, List, Optional, Protocol, Text, Union, overload
|
||||
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: ...
|
||||
|
||||
_File = Union[Text, os.PathLike[Text], _ReadableBinary]
|
||||
|
||||
@overload
|
||||
def what(file: _File, h: None = ...) -> Optional[str]: ...
|
||||
def what(file: Union[StrPath, _ReadableBinary], h: None = ...) -> Optional[str]: ...
|
||||
@overload
|
||||
def what(file: Any, h: bytes) -> Optional[str]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user