Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,6 +1,6 @@
import sys
from _typeshed import FileDescriptorLike
from typing import Any, Iterable, List, Optional, Tuple
from typing import Any, Iterable, List, Tuple
if sys.platform != "win32":
PIPE_BUF: int
@@ -21,10 +21,10 @@ class poll:
def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
def modify(self, fd: FileDescriptorLike, eventmask: int) -> None: ...
def unregister(self, fd: FileDescriptorLike) -> None: ...
def poll(self, timeout: Optional[float] = ...) -> List[Tuple[int, int]]: ...
def poll(self, timeout: float | None = ...) -> List[Tuple[int, int]]: ...
def select(
__rlist: Iterable[Any], __wlist: Iterable[Any], __xlist: Iterable[Any], __timeout: Optional[float] = ...
__rlist: Iterable[Any], __wlist: Iterable[Any], __xlist: Iterable[Any], __timeout: float | None = ...
) -> Tuple[List[Any], List[Any], List[Any]]: ...
class error(Exception): ...
@@ -53,7 +53,7 @@ if sys.platform != "linux" and sys.platform != "win32":
def __init__(self) -> None: ...
def close(self) -> None: ...
def control(
self, __changelist: Optional[Iterable[kevent]], __maxevents: int, __timeout: Optional[float] = ...
self, __changelist: Iterable[kevent] | None, __maxevents: int, __timeout: float | None = ...
) -> List[kevent]: ...
def fileno(self) -> int: ...
@classmethod
@@ -106,7 +106,7 @@ if sys.platform == "linux":
def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
def modify(self, fd: FileDescriptorLike, eventmask: int) -> None: ...
def unregister(self, fd: FileDescriptorLike) -> None: ...
def poll(self, timeout: Optional[float] = ..., maxevents: int = ...) -> List[Tuple[int, int]]: ...
def poll(self, timeout: float | None = ..., maxevents: int = ...) -> List[Tuple[int, int]]: ...
@classmethod
def fromfd(cls, __fd: FileDescriptorLike) -> epoll: ...
EPOLLERR: int