mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Make loop optional in asyncio.Queue (#2923)
Default value is `None`, so `loop` should be optional.
This commit is contained in:
committed by
Jelle Zijlstra
parent
cf88c79a93
commit
4cd9a8ef91
@@ -2,7 +2,7 @@ import sys
|
||||
from asyncio.events import AbstractEventLoop
|
||||
from .coroutines import coroutine
|
||||
from .futures import Future
|
||||
from typing import Any, Generator, Generic, List, TypeVar
|
||||
from typing import Any, Generator, Generic, List, TypeVar, Optional
|
||||
|
||||
__all__: List[str]
|
||||
|
||||
@@ -13,7 +13,7 @@ class QueueFull(Exception): ...
|
||||
_T = TypeVar('_T')
|
||||
|
||||
class Queue(Generic[_T]):
|
||||
def __init__(self, maxsize: int = ..., *, loop: AbstractEventLoop = ...) -> None: ...
|
||||
def __init__(self, maxsize: int = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ...
|
||||
def _init(self, maxsize: int) -> None: ...
|
||||
def _get(self) -> _T: ...
|
||||
def _put(self, item: _T) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user