From d09932e524fdfca1008e3e8129a52445ed3a7da4 Mon Sep 17 00:00:00 2001 From: shrey kharbanda Date: Thu, 24 Sep 2026 06:47:42 +0000 Subject: [PATCH] style(images): ruff format the new module and calculator --- litellm/cost_calculator.py | 6 +----- litellm/images/dimensions.py | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py index 0f89105a7b9..96c789ca4c7 100644 --- a/litellm/cost_calculator.py +++ b/litellm/cost_calculator.py @@ -2021,11 +2021,7 @@ def _deployment_model_info( litellm_params: Final = getattr(litellm_logging_obj, "litellm_params", None) if litellm_params is None: return None - declared: Final = { - key: value - for key in _DEPLOYMENT_PRICING_KEYS - if (value := litellm_params.get(key)) is not None - } + declared: Final = {key: value for key in _DEPLOYMENT_PRICING_KEYS if (value := litellm_params.get(key)) is not None} nested: Final = next( ( model_info diff --git a/litellm/images/dimensions.py b/litellm/images/dimensions.py index bcb9eec9dca..e96cefa79ab 100644 --- a/litellm/images/dimensions.py +++ b/litellm/images/dimensions.py @@ -170,9 +170,7 @@ def _embedded_image_values(value: object, depth: int = 0) -> Iterator[bytes]: def _is_image_signature(head: bytes) -> bool: - return len(head) >= _IMAGE_SIGNATURE_BYTES and ( - get_image_type(head) in _IMAGE_SIGNATURES or head[:2] == b"BM" - ) + return len(head) >= _IMAGE_SIGNATURE_BYTES and (get_image_type(head) in _IMAGE_SIGNATURES or head[:2] == b"BM") def _header_dimensions(stream: IO[bytes], position: int) -> ImageDimensions | None: