mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user