mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-01 17:13:24 +08:00
Add attribute queue.Queue.queue. (#2870)
This commit is contained in:
committed by
Sebastian Rittau
parent
437d8e0ddd
commit
03878d732a
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user