mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Fixed Queue.get and Queue.put return types.
This commit is contained in:
committed by
Matthias Kramm
parent
c59a54a81a
commit
b90372f226
@@ -5,6 +5,7 @@ __all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue',
|
||||
|
||||
from asyncio.events import AbstractEventLoop
|
||||
from .tasks import coroutine
|
||||
from .futures import Future
|
||||
|
||||
|
||||
class QueueEmpty(Exception): ...
|
||||
@@ -28,10 +29,10 @@ class Queue(Generic[T]):
|
||||
def empty(self) -> bool: ...
|
||||
def full(self) -> bool: ...
|
||||
@coroutine
|
||||
def put(self, item: T) -> None: ...
|
||||
def put(self, item: T) -> Future: ...
|
||||
def put_nowait(self, item: T) -> None: ...
|
||||
@coroutine
|
||||
def get(self) -> T: ...
|
||||
def get(self) -> Future[T]: ...
|
||||
def get_nowait(self) -> T: ...
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user