Skip to content

Commit bd0195d

Browse files
committed
Import gather
1 parent e6c9050 commit bd0195d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from asyncio import Task, create_task
5+
from asyncio import Task, create_task, gather
66
from collections.abc import Awaitable, Callable
77
from dataclasses import replace
88
from datetime import UTC, datetime
@@ -510,9 +510,7 @@ async def get_missing_energy_logs(self) -> None:
510510
for t in to_cancel:
511511
t.cancel()
512512
# Drain cancellations to avoid "Task exception was never retrieved"
513-
from asyncio import gather as _gather
514-
515-
await _gather(*to_cancel, return_exceptions=True)
513+
await gather(*to_cancel, return_exceptions=True)
516514
break
517515

518516
if self._cache_enabled:

0 commit comments

Comments
 (0)