Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions asyncstdlib/builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion asyncstdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion asyncstdlib/contextlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion asyncstdlib/contextlib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
4 changes: 3 additions & 1 deletion asyncstdlib/functools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading