mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Add private methods stubs to queue.Queue (#1507)
It is a common pattern to subclass queue.Queue and override the private methods _init, _get, _put and _qsize so they should have stubs.
This commit is contained in:
@@ -12,14 +12,18 @@ class Full(Exception): ...
|
||||
class Queue(Generic[_T]):
|
||||
maxsize = ... # type: int
|
||||
def __init__(self, maxsize: int = ...) -> None: ...
|
||||
def _init(self, maxsize: int) -> None: ...
|
||||
def empty(self) -> bool: ...
|
||||
def full(self) -> bool: ...
|
||||
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
|
||||
def get_nowait(self) -> _T: ...
|
||||
def _get(self) -> _T: ...
|
||||
def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
def put_nowait(self, item: _T) -> None: ...
|
||||
def _put(self, item: _T) -> None: ...
|
||||
def join(self) -> None: ...
|
||||
def qsize(self) -> int: ...
|
||||
def _qsize(self) -> int: ...
|
||||
def task_done(self) -> None: ...
|
||||
|
||||
class PriorityQueue(Queue): ...
|
||||
|
||||
Reference in New Issue
Block a user