diff --git a/asyncstdlib/builtins.py b/asyncstdlib/builtins.py index 2d35a0c..48f2553 100644 --- a/asyncstdlib/builtins.py +++ b/asyncstdlib/builtins.py @@ -164,7 +164,7 @@ async def zip( async def _zip_inner( - aiters: Tuple[AsyncIterator[T], ...] + aiters: Tuple[AsyncIterator[T], ...], ) -> AsyncIterator[Tuple[T, ...]]: """Direct zip transposing tuple-of-iterators to iterator-of-tuples""" try: @@ -175,7 +175,7 @@ async def _zip_inner( async def _zip_inner_strict( - aiters: Tuple[AsyncIterator[T], ...] + aiters: Tuple[AsyncIterator[T], ...], ) -> AsyncIterator[Tuple[T, ...]]: """Length aware zip checking that all iterators are equal length""" # track index of the last iterator we tried to anext diff --git a/asyncstdlib/builtins.pyi b/asyncstdlib/builtins.pyi index 9039124..e4cf345 100644 --- a/asyncstdlib/builtins.pyi +++ b/asyncstdlib/builtins.pyi @@ -231,7 +231,7 @@ async def tuple(iterable: AnyIterable[T]) -> builtins.tuple[T, ...]: ... async def dict() -> builtins.dict[Any, Any]: ... @overload async def dict( - iterable: AnyIterable[builtins.tuple[HK, T]] + iterable: AnyIterable[builtins.tuple[HK, T]], ) -> builtins.dict[HK, T]: ... @overload async def dict( diff --git a/asyncstdlib/contextlib.py b/asyncstdlib/contextlib.py index e467c4d..0e0d39d 100644 --- a/asyncstdlib/contextlib.py +++ b/asyncstdlib/contextlib.py @@ -28,7 +28,7 @@ def contextmanager( - func: Callable[..., AsyncGenerator[T, None]] + func: Callable[..., AsyncGenerator[T, None]], ) -> Callable[..., AsyncContextManager[T]]: r""" Create an asynchronous context manager out of an asynchronous generator function diff --git a/asyncstdlib/contextlib.pyi b/asyncstdlib/contextlib.pyi index e6e683b..26a71b4 100644 --- a/asyncstdlib/contextlib.pyi +++ b/asyncstdlib/contextlib.pyi @@ -55,7 +55,7 @@ class ContextDecorator(AsyncContextManager[T], metaclass=ABCMeta): P = ParamSpec("P") def contextmanager( - func: Callable[P, AsyncGenerator[T, None]] + func: Callable[P, AsyncGenerator[T, None]], ) -> Callable[P, ContextDecorator[T]]: ... class closing(Generic[AClose]): diff --git a/asyncstdlib/functools.py b/asyncstdlib/functools.py index a035b12..2f8b83c 100644 --- a/asyncstdlib/functools.py +++ b/asyncstdlib/functools.py @@ -270,7 +270,9 @@ def decorator( return decorator - if not iscoroutinefunction(type_or_getter): + if not iscoroutinefunction( + type_or_getter # pyright: ignore[reportUnknownArgumentType] + ): raise ValueError("cached_property can only be used with a coroutine function") return CachedProperty(type_or_getter)