Skip to content

Commit b4f60ac

Browse files
authored
asyncio: Correct _waiters type (#11315)
1 parent 26452a7 commit b4f60ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/asyncio/locks.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ else:
4747
) -> None: ...
4848

4949
class Lock(_ContextManagerMixin, _LoopBoundMixin):
50+
_waiters: deque[Future[Any]] | None
5051
if sys.version_info >= (3, 10):
5152
def __init__(self) -> None: ...
5253
else:
@@ -57,6 +58,7 @@ class Lock(_ContextManagerMixin, _LoopBoundMixin):
5758
def release(self) -> None: ...
5859

5960
class Event(_LoopBoundMixin):
61+
_waiters: deque[Future[Any]]
6062
if sys.version_info >= (3, 10):
6163
def __init__(self) -> None: ...
6264
else:
@@ -68,6 +70,7 @@ class Event(_LoopBoundMixin):
6870
async def wait(self) -> Literal[True]: ...
6971

7072
class Condition(_ContextManagerMixin, _LoopBoundMixin):
73+
_waiters: deque[Future[Any]]
7174
if sys.version_info >= (3, 10):
7275
def __init__(self, lock: Lock | None = None) -> None: ...
7376
else:
@@ -83,7 +86,7 @@ class Condition(_ContextManagerMixin, _LoopBoundMixin):
8386

8487
class Semaphore(_ContextManagerMixin, _LoopBoundMixin):
8588
_value: int
86-
_waiters: deque[Future[Any]]
89+
_waiters: deque[Future[Any]] | None
8790
if sys.version_info >= (3, 10):
8891
def __init__(self, value: int = 1) -> None: ...
8992
else:

0 commit comments

Comments
 (0)