asyncio.Semaphore: type some internals (#4605)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanuandhauntsaninja authored and GitHub committed 2020-10-04 12:53:02 +02:00
1 parent 7afc733054
commit 52974e0a2b
1 file changed
+5 -1
+5 -1
View File
@@ -1,8 +1,9 @@
import sys
from types import TracebackType
from typing import Any, Awaitable, Callable, Generator, Optional, Type, TypeVar, Union
from typing import Any, Awaitable, Callable, Deque, Generator, Optional, Type, TypeVar, Union
from .events import AbstractEventLoop
from .futures import Future
_T = TypeVar("_T")
@@ -55,10 +56,13 @@ class Condition(_ContextManagerMixin):
def notify_all(self) -> None: ...
class Semaphore(_ContextManagerMixin):
_value: int
_waiters: Deque[Future[Any]]
def __init__(self, value: int = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ...
def locked(self) -> bool: ...
async def acquire(self) -> bool: ...
def release(self) -> None: ...
def _wake_up_next(self) -> None: ...
class BoundedSemaphore(Semaphore):
def __init__(self, value: int = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ...