Skip to content

Commit c3e3414

Browse files
fix: use asynccontextmanager
1 parent 0113765 commit c3e3414

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

capnp/__init__.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ from __future__ import annotations
22

33
import asyncio
44
from collections.abc import (
5+
AsyncIterator,
56
Awaitable,
67
Callable,
78
Iterator,
89
Mapping,
910
MutableMapping,
1011
Sequence,
1112
)
12-
from contextlib import contextmanager
13+
from contextlib import asynccontextmanager
1314
from types import ModuleType
1415
from typing import Any, Generic, Protocol, TypeVar, overload
1516

@@ -1552,8 +1553,8 @@ async def run(coro: Awaitable[T]) -> T:
15521553
"""
15531554
...
15541555

1555-
@contextmanager
1556-
def kj_loop() -> Iterator[None]:
1556+
@asynccontextmanager
1557+
def kj_loop() -> AsyncIterator[None]:
15571558
"""Context manager for running the KJ event loop.
15581559
15591560
Usage:

0 commit comments

Comments
 (0)