Improved annotations for select.select() (#1080)

This commit is contained in:
Nikhil Marathe authored and Guido van Rossum committed 2017-03-23 10:30:48 -07:00
1 parent fa104ea456
commit 7e05d47b81
2 files changed
+14 -7

No files matched your search

+6 -2
View File
@@ -1,6 +1,6 @@
"""Stubs for the 'select' module."""
from typing import Any, Optional, Tuple, Iterable, List
from typing import Any, Optional, Tuple, Iterable, List, Sequence, TypeVar
EPOLLERR = ... # type: int
EPOLLET = ... # type: int
@@ -66,7 +66,11 @@ POLLWRBAND = ... # type: int
POLLWRNORM = ... # type: int
def poll() -> epoll: ...
def select(rlist, wlist, xlist, timeout: float = None) -> Tuple[List, List, List]: ...
_R = TypeVar("_R")
_W = TypeVar("_W")
_X = TypeVar("_X")
def select(rlist: Sequence[_R], wlist: Sequence[_W], xlist: Sequence[_X], timeout: float = None) -> Tuple[List[_R], List[_W], List[_X]]: ...
class error(Exception): ...