mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Queue.get(...) takes optional float (#661)
This commit is contained in:
committed by
Guido van Rossum
parent
9881a2567e
commit
cd1ef9149b
@@ -1,6 +1,6 @@
|
||||
# Stubs for Queue (Python 2)
|
||||
|
||||
from typing import Any, TypeVar, Generic
|
||||
from typing import Any, TypeVar, Generic, Optional
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
@@ -22,7 +22,7 @@ class Queue(Generic[_T]):
|
||||
def full(self) -> bool: ...
|
||||
def put(self, item: _T, block: bool = ..., timeout: float = ...) -> None: ...
|
||||
def put_nowait(self, item: _T) -> None: ...
|
||||
def get(self, block: bool = ..., timeout: float = ...) -> _T: ...
|
||||
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
|
||||
def get_nowait(self) -> _T: ...
|
||||
|
||||
class PriorityQueue(Queue): ...
|
||||
|
||||
Reference in New Issue
Block a user