Files
typeshed/stdlib/3/queue.pyi
Jelle Zijlstra 349ff59f33 change empty bodies from "pass" to "..."
CONTRIBUTING.md says to prefer ... Not the most impactful change but fixing
these will allow us to lint for it in the future and get a consistent style.
2017-03-16 09:13:08 -07:00

25 lines
710 B
Python

# Stubs for queue
# NOTE: These are incomplete!
from typing import Any, TypeVar, Generic, Optional
_T = TypeVar('_T')
class Empty(Exception): ...
class Full(Exception): ...
class Queue(Generic[_T]):
def __init__(self, maxsize: int = ...) -> None: ...
def full(self) -> bool: ...
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
def get_nowait(self) -> _T: ...
def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
def put_nowait(self, item: _T) -> None: ...
def join(self) -> None: ...
def qsize(self) -> int: ...
def task_done(self) -> None: ...
class PriorityQueue(Queue): ...
class LifoQueue(Queue): ...