Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

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