mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 11:32:07 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, Optional, Union
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, Union
|
||||
|
||||
_File = Union[str, IO[bytes]]
|
||||
|
||||
@@ -20,7 +20,7 @@ class Wave_read:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def getfp(self) -> Optional[BinaryIO]: ...
|
||||
def getfp(self) -> BinaryIO | None: ...
|
||||
def rewind(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def tell(self) -> int: ...
|
||||
@@ -63,7 +63,7 @@ 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: ...
|
||||
|
||||
if sys.version_info < (3, 9):
|
||||
openfp = open
|
||||
|
||||
Reference in New Issue
Block a user