Skip to content

Commit 4d5cc71

Browse files
Merge pull request #170 from maxfischer2781/maintenance/static_checks_742
Fix static checks #730
2 parents e87d396 + e5d110b commit 4d5cc71

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

asyncstdlib/builtins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ async def zip(
164164

165165

166166
async def _zip_inner(
167-
aiters: Tuple[AsyncIterator[T], ...]
167+
aiters: Tuple[AsyncIterator[T], ...],
168168
) -> AsyncIterator[Tuple[T, ...]]:
169169
"""Direct zip transposing tuple-of-iterators to iterator-of-tuples"""
170170
try:
@@ -175,7 +175,7 @@ async def _zip_inner(
175175

176176

177177
async def _zip_inner_strict(
178-
aiters: Tuple[AsyncIterator[T], ...]
178+
aiters: Tuple[AsyncIterator[T], ...],
179179
) -> AsyncIterator[Tuple[T, ...]]:
180180
"""Length aware zip checking that all iterators are equal length"""
181181
# track index of the last iterator we tried to anext

asyncstdlib/builtins.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ async def tuple(iterable: AnyIterable[T]) -> builtins.tuple[T, ...]: ...
231231
async def dict() -> builtins.dict[Any, Any]: ...
232232
@overload
233233
async def dict(
234-
iterable: AnyIterable[builtins.tuple[HK, T]]
234+
iterable: AnyIterable[builtins.tuple[HK, T]],
235235
) -> builtins.dict[HK, T]: ...
236236
@overload
237237
async def dict(

asyncstdlib/contextlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
def contextmanager(
31-
func: Callable[..., AsyncGenerator[T, None]]
31+
func: Callable[..., AsyncGenerator[T, None]],
3232
) -> Callable[..., AsyncContextManager[T]]:
3333
r"""
3434
Create an asynchronous context manager out of an asynchronous generator function

asyncstdlib/contextlib.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ContextDecorator(AsyncContextManager[T], metaclass=ABCMeta):
5555
P = ParamSpec("P")
5656

5757
def contextmanager(
58-
func: Callable[P, AsyncGenerator[T, None]]
58+
func: Callable[P, AsyncGenerator[T, None]],
5959
) -> Callable[P, ContextDecorator[T]]: ...
6060

6161
class closing(Generic[AClose]):

asyncstdlib/functools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ def decorator(
270270

271271
return decorator
272272

273-
if not iscoroutinefunction(type_or_getter):
273+
if not iscoroutinefunction(
274+
type_or_getter # pyright: ignore[reportUnknownArgumentType]
275+
):
274276
raise ValueError("cached_property can only be used with a coroutine function")
275277

276278
return CachedProperty(type_or_getter)

0 commit comments

Comments
 (0)