mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -28,7 +28,7 @@ class poll:
|
||||
def poll(self, timeout: float | None = ...) -> list[tuple[int, int]]: ...
|
||||
|
||||
def select(
|
||||
__rlist: Iterable[Any], __wlist: Iterable[Any], __xlist: Iterable[Any], __timeout: float | None = None
|
||||
rlist: Iterable[Any], wlist: Iterable[Any], xlist: Iterable[Any], timeout: float | None = None, /
|
||||
) -> tuple[list[Any], list[Any], list[Any]]: ...
|
||||
|
||||
error = OSError
|
||||
@@ -60,11 +60,11 @@ if sys.platform != "linux" and sys.platform != "win32":
|
||||
def __init__(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def control(
|
||||
self, __changelist: Iterable[kevent] | None, __maxevents: int, __timeout: float | None = None
|
||||
self, changelist: Iterable[kevent] | None, maxevents: int, timeout: float | None = None, /
|
||||
) -> list[kevent]: ...
|
||||
def fileno(self) -> int: ...
|
||||
@classmethod
|
||||
def fromfd(cls, __fd: FileDescriptorLike) -> kqueue: ...
|
||||
def fromfd(cls, fd: FileDescriptorLike, /) -> kqueue: ...
|
||||
|
||||
KQ_EV_ADD: int
|
||||
KQ_EV_CLEAR: int
|
||||
@@ -112,9 +112,10 @@ if sys.platform == "linux":
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self,
|
||||
__exc_type: type[BaseException] | None = None,
|
||||
__exc_value: BaseException | None = ...,
|
||||
__exc_tb: TracebackType | None = None,
|
||||
exc_type: type[BaseException] | None = None,
|
||||
exc_value: BaseException | None = ...,
|
||||
exc_tb: TracebackType | None = None,
|
||||
/,
|
||||
) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
closed: bool
|
||||
@@ -124,7 +125,7 @@ if sys.platform == "linux":
|
||||
def unregister(self, fd: FileDescriptorLike) -> None: ...
|
||||
def poll(self, timeout: float | None = None, maxevents: int = -1) -> list[tuple[int, int]]: ...
|
||||
@classmethod
|
||||
def fromfd(cls, __fd: FileDescriptorLike) -> epoll: ...
|
||||
def fromfd(cls, fd: FileDescriptorLike, /) -> epoll: ...
|
||||
|
||||
EPOLLERR: int
|
||||
EPOLLEXCLUSIVE: int
|
||||
|
||||
Reference in New Issue
Block a user