style(images): ruff format the new module and calculator

This commit is contained in:
shrey kharbanda 2026-09-24 06:47:42 +00:00
parent 3b99829b3c
commit d09932e524
2 changed files with 2 additions and 8 deletions

View file

@ -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

View file

@ -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: