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 @@
import sys
from _typeshed import ReadableBuffer, WriteableBuffer
from collections.abc import Iterable
from typing import Any, Optional, SupportsInt, Tuple, Union, overload
from typing import Any, SupportsInt, Tuple, Union, overload
if sys.version_info >= (3, 8):
from typing import SupportsIndex
@@ -541,7 +541,7 @@ class socket:
def getsockopt(self, __level: int, __optname: int, __buflen: int) -> bytes: ...
if sys.version_info >= (3, 7):
def getblocking(self) -> bool: ...
def gettimeout(self) -> Optional[float]: ...
def gettimeout(self) -> float | None: ...
if sys.platform == "win32":
def ioctl(self, __control: int, __option: int | tuple[int, int, int] | bool) -> None: ...
def listen(self, __backlog: int = ...) -> None: ...
@@ -599,7 +599,7 @@ def getaddrinfo(
type: int = ...,
proto: int = ...,
flags: int = ...,
) -> list[tuple[int, int, int, str, Union[tuple[str, int], tuple[str, int, int, int]]]]: ...
) -> list[tuple[int, int, int, str, tuple[str, int] | tuple[str, int, int, int]]]: ...
def gethostbyname(__hostname: str) -> str: ...
def gethostbyname_ex(__hostname: str) -> tuple[str, list[str], list[str]]: ...
def gethostname() -> str: ...
@@ -618,7 +618,7 @@ def inet_pton(__address_family: int, __ip_string: str) -> bytes: ...
def inet_ntop(__address_family: int, __packed_ip: bytes) -> str: ...
def CMSG_LEN(__length: int) -> int: ...
def CMSG_SPACE(__length: int) -> int: ...
def getdefaulttimeout() -> Optional[float]: ...
def getdefaulttimeout() -> float | None: ...
def setdefaulttimeout(__timeout: float | None) -> None: ...
def socketpair(__family: int = ..., __type: int = ..., __proto: int = ...) -> tuple[socket, socket]: ...