diff --git a/stdlib/2.7/Queue.pyi b/stdlib/2.7/Queue.pyi index c12ee7ac5..61ba5107b 100644 --- a/stdlib/2.7/Queue.pyi +++ b/stdlib/2.7/Queue.pyi @@ -1,13 +1,13 @@ # Stubs for Queue (Python 2) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any +from typing import Any, TypeVar, Generic + +_T = TypeVar('_T') class Empty(Exception): ... class Full(Exception): ... -class Queue: +class Queue(Generic[_T]): maxsize = ... # type: Any mutex = ... # type: Any not_empty = ... # type: Any @@ -20,10 +20,10 @@ class Queue: def qsize(self) -> int: ... def empty(self) -> bool: ... def full(self) -> bool: ... - def put(self, item: Any, block: bool = ..., timeout: float = ...) -> None: ... - def put_nowait(self, item) -> None: ... - def get(self, block: bool = ..., timeout: float = ...) -> Any: ... - def get_nowait(self) -> Any: ... + def put(self, item: _T, block: bool = ..., timeout: float = ...) -> None: ... + def put_nowait(self, item: _T) -> None: ... + def get(self, block: bool = ..., timeout: float = ...) -> _T: ... + def get_nowait(self) -> _T: ... class PriorityQueue(Queue): ... class LifoQueue(Queue): ...