Skip to content

Commit 40562a0

Browse files
committed
Sure would be nice if the typeshed was good and inference was well defined
1 parent d4219f3 commit 40562a0

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: [ '3.12', '3.13', '3.14-dev' ]
21+
python-version: [ '3.12', '3.13' ]
2222

2323
name: "Type Coverage and Linting @ ${{ matrix.python-version }}"
2424
steps:

src/async_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
__author__ = "Michael Hall"
1010
__license__ = "Apache-2.0"
1111
__copyright__ = "Copyright 2020-Present Michael Hall"
12-
__version__ = "2025.03.12b"
12+
__version__ = "2025.03.30b"
1313

1414
import os
1515
import sys

src/async_utils/waterfall.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ async def _dispatch_loop(self) -> None:
168168
# PYUPDATE: remove this block at python 3.13 minimum
169169
else:
170170
set_name("waterfall.finalizer")
171-
g = asyncio.gather(f, *tasks, return_exceptions=True)
171+
# TYPESHED:
172+
# Gather doesnt return a Future, it returns a GatheringFuture
173+
# We only use the Future compatible api
174+
# the result of that future is also not accurate in the typeshed.
175+
# as we dont rely on the type of the result, the below is annotated
176+
# to avoid spurious errors much as possible from inaccuracies.
177+
# See: https://github.com/mikeshardmind/async-utils/actions/runs/14119338111
178+
g: asyncio.Future[t.Any] = asyncio.gather(f, *tasks, return_exceptions=True)
172179
try:
173180
await asyncio.wait_for(g, timeout=self.max_wait_finalize)
174181
except TimeoutError:

0 commit comments

Comments
 (0)