@@ -334,7 +334,7 @@ def wait_for_target_processed(
334
334
self ,
335
335
target_id : str ,
336
336
seconds_between_requests : float = 0.2 ,
337
- timeout_seconds : float | None = 60 * 5 ,
337
+ timeout_seconds : float = 60 * 5 ,
338
338
) -> None :
339
339
"""
340
340
Wait up to five minutes (arbitrary) for a target to get past the
@@ -348,8 +348,7 @@ def wait_for_target_processed(
348
348
decrease the number of calls made to the API, to decrease the
349
349
likelihood of hitting the request quota.
350
350
timeout_seconds: The maximum number of seconds to wait for the
351
- target to be processed. If ``None`` is given, no maximum is
352
- applied.
351
+ target to be processed.
353
352
354
353
Raises:
355
354
~vws.exceptions.vws_exceptions.AuthenticationFailure: The secret
@@ -371,10 +370,9 @@ def wait_for_target_processed(
371
370
if report .status != TargetStatuses .PROCESSING :
372
371
return
373
372
374
- if timeout_seconds is not None :
375
- elapsed_time = time .monotonic () - start_time
376
- if elapsed_time > timeout_seconds : # pragma: no cover
377
- raise TargetProcessingTimeout
373
+ elapsed_time = time .monotonic () - start_time
374
+ if elapsed_time > timeout_seconds : # pragma: no cover
375
+ raise TargetProcessingTimeout
378
376
379
377
time .sleep (seconds_between_requests )
380
378
0 commit comments