diff --git a/src/anyio/_backends/_asyncio.py b/src/anyio/_backends/_asyncio.py index 798d7c5a..0b7479d2 100644 --- a/src/anyio/_backends/_asyncio.py +++ b/src/anyio/_backends/_asyncio.py @@ -408,9 +408,8 @@ def __init__(self, deadline: float = math.inf, shield: bool = False): self._cancel_handle: asyncio.Handle | None = None self._tasks: set[asyncio.Task] = set() self._host_task: asyncio.Task | None = None - self._pending_uncancellations: int | None if sys.version_info >= (3, 11): - self._pending_uncancellations = 0 + self._pending_uncancellations: int | None = 0 else: self._pending_uncancellations = None