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

This commit is contained in:
Akuli authored and GitHub committed 2021-08-08 11:05:21 +02:00
1 parent b9adb7a874
commit ee487304d7
578 files changed
+8080 -8966

No files matched your search

+4 -4
View File
@@ -1,7 +1,7 @@
from _typeshed import Self
from email.message import Message
from types import TracebackType
from typing import IO, Any, BinaryIO, Callable, Iterable, List, Optional, Tuple, Type, TypeVar
from typing import IO, Any, BinaryIO, Callable, Iterable, List, Tuple, Type, TypeVar
_AIUT = TypeVar("_AIUT", bound=addbase)
@@ -10,7 +10,7 @@ class addbase(BinaryIO):
def __init__(self, fp: IO[bytes]) -> None: ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]
self, type: Type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
) -> None: ...
def __iter__(self: _AIUT) -> _AIUT: ...
def __next__(self) -> bytes: ...
@@ -29,7 +29,7 @@ class addbase(BinaryIO):
def seek(self, offset: int, whence: int = ...) -> int: ...
def seekable(self) -> bool: ...
def tell(self) -> int: ...
def truncate(self, size: Optional[int] = ...) -> int: ...
def truncate(self, size: int | None = ...) -> int: ...
def writable(self) -> bool: ...
def write(self, s: bytes) -> int: ...
def writelines(self, lines: Iterable[bytes]) -> None: ...
@@ -47,6 +47,6 @@ class addinfo(addbase):
class addinfourl(addinfo):
url: str
code: int
def __init__(self, fp: IO[bytes], headers: Message, url: str, code: Optional[int] = ...) -> None: ...
def __init__(self, fp: IO[bytes], headers: Message, url: str, code: int | None = ...) -> None: ...
def geturl(self) -> str: ...
def getcode(self) -> int: ...