mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-30 01:52:18 +00:00
style(images): ruff format the new module and calculator
This commit is contained in:
parent
3b99829b3c
commit
d09932e524
2 changed files with 2 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue