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: