File: queue.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (24 lines) | stat: -rw-r--r-- 711 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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: pass

class PriorityQueue(Queue): ...
class LifoQueue(Queue): ...