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, NoReturn, Optional, Text, Tuple, Union
|
||||
from typing import IO, Any, NoReturn, Text, Tuple, Union
|
||||
|
||||
_File = Union[Text, IO[bytes]]
|
||||
|
||||
@@ -23,7 +23,7 @@ _sunau_params = Tuple[int, int, int, int, str, str]
|
||||
|
||||
class Au_read:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
def getfp(self) -> Optional[IO[bytes]]: ...
|
||||
def getfp(self) -> IO[bytes] | None: ...
|
||||
def rewind(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def tell(self) -> int: ...
|
||||
@@ -37,7 +37,7 @@ class Au_read:
|
||||
def getmarkers(self) -> None: ...
|
||||
def getmark(self, id: Any) -> NoReturn: ...
|
||||
def setpos(self, pos: int) -> None: ...
|
||||
def readframes(self, nframes: int) -> Optional[bytes]: ...
|
||||
def readframes(self, nframes: int) -> bytes | None: ...
|
||||
|
||||
class Au_write:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
@@ -61,6 +61,6 @@ class Au_write:
|
||||
def close(self) -> None: ...
|
||||
|
||||
# Returns a Au_read if mode is rb and Au_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