Skip to content

Commit 8da3df6

Browse files
authored
Fix some untyped calls (#1865)
1 parent f632771 commit 8da3df6

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

pyproject.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,6 @@ module = [
202202
"zarr.v2.*",
203203
"zarr.array_v2",
204204
"zarr.array",
205-
"zarr.common",
206-
"zarr.store.local",
207-
"zarr.codecs.blosc",
208-
"zarr.codecs.gzip",
209-
"zarr.codecs.zstd",
210205
]
211206
disallow_untyped_calls = false
212207

src/zarr/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ async def concurrent_map(
5252
else:
5353
sem = asyncio.Semaphore(limit)
5454

55-
async def run(item):
55+
async def run(item: Tuple[Any]) -> V:
5656
async with sem:
5757
return await func(*item)
5858

5959
return await asyncio.gather(*[asyncio.ensure_future(run(item)) for item in items])
6060

6161

62-
async def to_thread(func, /, *args, **kwargs):
62+
async def to_thread(func: Callable[..., V], /, *args: Any, **kwargs: Any) -> V:
6363
loop = asyncio.get_running_loop()
6464
ctx = contextvars.copy_context()
6565
func_call = functools.partial(ctx.run, func, *args, **kwargs)

0 commit comments

Comments
 (0)