Make Queue generic in Python 2, similar to Python 3 (#155)

This commit is contained in:
Jukka Lehtosalo
2016-04-22 15:49:02 +01:00
parent 5eaf522cde
commit 8df19841bb

View File

@@ -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): ...