Add attribute queue.Queue.queue. (#2870)

This commit is contained in:
Rebecca Chen
2019-03-16 14:11:48 -07:00
committed by Sebastian Rittau
parent 437d8e0ddd
commit 03878d732a
2 changed files with 11 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
# Stubs for Queue (Python 2)
from collections import deque
from typing import Any, TypeVar, Generic, Optional
_T = TypeVar('_T')
@@ -8,12 +9,13 @@ class Empty(Exception): ...
class Full(Exception): ...
class Queue(Generic[_T]):
maxsize = ... # type: Any
mutex = ... # type: Any
not_empty = ... # type: Any
not_full = ... # type: Any
all_tasks_done = ... # type: Any
unfinished_tasks = ... # type: Any
maxsize: Any
mutex: Any
not_empty: Any
not_full: Any
all_tasks_done: Any
unfinished_tasks: Any
queue: deque # undocumented
def __init__(self, maxsize: int = ...) -> None: ...
def task_done(self) -> None: ...
def join(self) -> None: ...

View File

@@ -2,6 +2,7 @@
# NOTE: These are incomplete!
from collections import deque
from typing import Any, TypeVar, Generic, Optional
_T = TypeVar('_T')
@@ -10,7 +11,8 @@ class Empty(Exception): ...
class Full(Exception): ...
class Queue(Generic[_T]):
maxsize = ... # type: int
maxsize: int
queue: deque # undocumented
def __init__(self, maxsize: int = ...) -> None: ...
def _init(self, maxsize: int) -> None: ...
def empty(self) -> bool: ...