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,15 +1,15 @@
import sys
from _typeshed import ReadableBuffer, WriteableBuffer
from typing import Any, Iterator, Tuple, Union
from typing import Any, Iterator, Tuple
class error(Exception): ...
def pack(fmt: Union[str, bytes], *v: Any) -> bytes: ...
def pack_into(fmt: Union[str, bytes], buffer: WriteableBuffer, offset: int, *v: Any) -> None: ...
def unpack(__format: Union[str, bytes], __buffer: ReadableBuffer) -> Tuple[Any, ...]: ...
def unpack_from(__format: Union[str, bytes], buffer: ReadableBuffer, offset: int = ...) -> Tuple[Any, ...]: ...
def iter_unpack(__format: Union[str, bytes], __buffer: ReadableBuffer) -> Iterator[Tuple[Any, ...]]: ...
def calcsize(__format: Union[str, bytes]) -> int: ...
def pack(fmt: str | bytes, *v: Any) -> bytes: ...
def pack_into(fmt: str | bytes, buffer: WriteableBuffer, offset: int, *v: Any) -> None: ...
def unpack(__format: str | bytes, __buffer: ReadableBuffer) -> Tuple[Any, ...]: ...
def unpack_from(__format: str | bytes, buffer: ReadableBuffer, offset: int = ...) -> Tuple[Any, ...]: ...
def iter_unpack(__format: str | bytes, __buffer: ReadableBuffer) -> Iterator[Tuple[Any, ...]]: ...
def calcsize(__format: str | bytes) -> int: ...
class Struct:
if sys.version_info >= (3, 7):
@@ -17,7 +17,7 @@ class Struct:
else:
format: bytes
size: int
def __init__(self, format: Union[str, bytes]) -> None: ...
def __init__(self, format: str | bytes) -> None: ...
def pack(self, *v: Any) -> bytes: ...
def pack_into(self, buffer: WriteableBuffer, offset: int, *v: Any) -> None: ...
def unpack(self, __buffer: ReadableBuffer) -> Tuple[Any, ...]: ...