Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,4 +1,4 @@
from typing import IO, Any, BinaryIO, NoReturn, Optional, Text, Tuple, Union
from typing import IO, Any, BinaryIO, NoReturn, Text, Tuple, Union
_File = Union[Text, IO[bytes]]
@@ -10,7 +10,7 @@ _wave_params = Tuple[int, int, int, int, str, str]
class Wave_read:
def __init__(self, f: _File) -> None: ...
def getfp(self) -> Optional[BinaryIO]: ...
def getfp(self) -> BinaryIO | None: ...
def rewind(self) -> None: ...
def close(self) -> None: ...
def tell(self) -> int: ...
@@ -51,6 +51,6 @@ class Wave_write:
def close(self) -> None: ...
# Returns a Wave_read if mode is rb and Wave_write if mode is wb
def open(f: _File, mode: Optional[str] = ...) -> Any: ...
def open(f: _File, mode: str | None = ...) -> Any: ...
openfp = open