diff --git a/src/vws/async_vws.py b/src/vws/async_vws.py index 87a3cfc11..4dcbe5321 100644 --- a/src/vws/async_vws.py +++ b/src/vws/async_vws.py @@ -148,9 +148,7 @@ async def make_request( # The Vuforia API returns a 429 response with no JSON body. raise TooManyRequestsError(response=response) - if ( - response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR - ): # pragma: no cover + if response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR: raise ServerError(response=response) result_code = string_field( @@ -343,7 +341,7 @@ async def wait_for_target_processed( return elapsed_time = asyncio.get_event_loop().time() - start_time - if elapsed_time > timeout_seconds: # pragma: no cover + if elapsed_time > timeout_seconds: raise TargetProcessingTimeoutError await asyncio.sleep( diff --git a/src/vws/vws.py b/src/vws/vws.py index b02268f92..d8c4b0e5a 100644 --- a/src/vws/vws.py +++ b/src/vws/vws.py @@ -134,9 +134,7 @@ def make_request( # The Vuforia API returns a 429 response with no JSON body. raise TooManyRequestsError(response=response) - if ( - response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR - ): # pragma: no cover + if response.status_code >= HTTPStatus.INTERNAL_SERVER_ERROR: raise ServerError(response=response) result_code = string_field( @@ -323,7 +321,7 @@ def wait_for_target_processed( return elapsed_time = time.monotonic() - start_time - if elapsed_time > timeout_seconds: # pragma: no cover + if elapsed_time > timeout_seconds: raise TargetProcessingTimeoutError time.sleep(seconds_between_requests)