The timeout argument to Queue.{get,put} may be None (#682)

Python 2 and 3.
This commit is contained in:
Onno Kortmann
2016-11-11 19:29:52 +01:00
committed by Guido van Rossum
parent 2d19599b68
commit c4125739e5
2 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
# NOTE: These are incomplete!
from typing import Any, TypeVar, Generic
from typing import Any, TypeVar, Generic, Optional
_T = TypeVar('_T')
@@ -12,9 +12,9 @@ class Full(Exception): ...
class Queue(Generic[_T]):
def __init__(self, maxsize: int = ...) -> None: ...
def full(self) -> bool: ...
def get(self, block: bool = ..., timeout: float = ...) -> _T: ...
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
def get_nowait(self) -> _T: ...
def put(self, item: _T, block: bool = ..., timeout: float = ...) -> None: ...
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: ...