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

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

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: ...