Skip to content

Commit 241a0e9

Browse files
committed
improve types
1 parent edd826e commit 241a0e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/service-library/src/servicelib/async_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from functools import wraps
88
from typing import TYPE_CHECKING, Any, ParamSpec, TypeVar
99

10-
from pydantic import NonNegativeFloat
11-
1210
from . import tracing
1311
from .utils_profiling_middleware import dont_profile, is_profiling, profile_context
1412

@@ -225,7 +223,7 @@ class TaskCancelled(Exception):
225223
async def _poller_for_task_group(
226224
close_event: asyncio.Event,
227225
cancel_awaitable: TaskCancelCallback,
228-
poll_interval: NonNegativeFloat,
226+
poll_interval: float,
229227
):
230228
"""
231229
Polls for cancellation via the callback and raises TaskCancelled if it occurs.
@@ -241,7 +239,7 @@ async def run_until_cancelled(
241239
*,
242240
coro: Coroutine,
243241
cancel_callback: TaskCancelCallback,
244-
poll_interval: NonNegativeFloat = _POLL_INTERVAL_S,
242+
poll_interval: float = _POLL_INTERVAL_S,
245243
) -> Any:
246244
"""
247245
Runs the given coroutine until it completes or cancellation is requested.

0 commit comments

Comments
 (0)