From c2b5b090801ee1294b5740edce8af1455da0d4d3 Mon Sep 17 00:00:00 2001 From: 72004 Date: Tue, 22 Sep 2026 18:29:12 +0500 Subject: [PATCH] style: satisfy ruff format on exception_mapping_utils.py --- litellm/litellm_core_utils/exception_mapping_utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/litellm_core_utils/exception_mapping_utils.py b/litellm/litellm_core_utils/exception_mapping_utils.py index 6e3887a4502..016a403281b 100644 --- a/litellm/litellm_core_utils/exception_mapping_utils.py +++ b/litellm/litellm_core_utils/exception_mapping_utils.py @@ -601,9 +601,7 @@ def _map_anthropic_exception( # Anthropic returns usage/spend-limit exhaustion typed as invalid_request_error (400), # but per the exception-mapping docs it should surface as a RateLimitError (429). Check # before the generic 400 branches below, which would otherwise map it to BadRequestError. - if ExceptionCheckers.is_error_str_rate_limit( - error_str, getattr(original_exception, "status_code", None) - ): + if ExceptionCheckers.is_error_str_rate_limit(error_str, getattr(original_exception, "status_code", None)): raise RateLimitError( message=f"AnthropicError - {error_str}", model=model,