mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Add TypeVars for the Iterators in select.select (#15022)
This commit is contained in:
+8
-4
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import FileDescriptorLike
|
||||
from collections.abc import Iterable
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, Final, final
|
||||
from typing_extensions import Self
|
||||
from typing import Any, ClassVar, Final, TypeVar, final
|
||||
from typing_extensions import Never, Self
|
||||
|
||||
if sys.platform != "win32":
|
||||
PIPE_BUF: Final[int]
|
||||
@@ -31,9 +31,13 @@ if sys.platform != "win32":
|
||||
def unregister(self, fd: FileDescriptorLike, /) -> None: ...
|
||||
def poll(self, timeout: float | None = None, /) -> list[tuple[int, int]]: ...
|
||||
|
||||
_R = TypeVar("_R", default=Never)
|
||||
_W = TypeVar("_W", default=Never)
|
||||
_X = TypeVar("_X", default=Never)
|
||||
|
||||
def select(
|
||||
rlist: Iterable[Any], wlist: Iterable[Any], xlist: Iterable[Any], timeout: float | None = None, /
|
||||
) -> tuple[list[Any], list[Any], list[Any]]: ...
|
||||
rlist: Iterable[_R], wlist: Iterable[_W], xlist: Iterable[_X], timeout: float | None = None, /
|
||||
) -> tuple[list[_R], list[_W], list[_X]]: ...
|
||||
|
||||
error = OSError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user