mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
29
stdlib/@python2/Queue.pyi
Normal file
29
stdlib/@python2/Queue.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
from collections import deque
|
||||
from typing import Any, Deque, Generic, Optional, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class Empty(Exception): ...
|
||||
class Full(Exception): ...
|
||||
|
||||
class Queue(Generic[_T]):
|
||||
maxsize: Any
|
||||
mutex: Any
|
||||
not_empty: Any
|
||||
not_full: Any
|
||||
all_tasks_done: Any
|
||||
unfinished_tasks: Any
|
||||
queue: Deque[Any] # undocumented
|
||||
def __init__(self, maxsize: int = ...) -> None: ...
|
||||
def task_done(self) -> None: ...
|
||||
def join(self) -> None: ...
|
||||
def qsize(self) -> int: ...
|
||||
def empty(self) -> bool: ...
|
||||
def full(self) -> bool: ...
|
||||
def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
def put_nowait(self, item: _T) -> None: ...
|
||||
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
|
||||
def get_nowait(self) -> _T: ...
|
||||
|
||||
class PriorityQueue(Queue[_T]): ...
|
||||
class LifoQueue(Queue[_T]): ...
|
||||
Reference in New Issue
Block a user