From e192c96cd27b5befd4759c719cea1877bc355bf3 Mon Sep 17 00:00:00 2001 From: ViditOstwal Date: Thu, 6 Aug 2026 20:43:49 +0530 Subject: [PATCH] Apply ruff formatting to usage metrics helpers. --- lib/crewai/src/crewai/types/usage_metrics.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/crewai/src/crewai/types/usage_metrics.py b/lib/crewai/src/crewai/types/usage_metrics.py index 56e56666f..7d58a47b3 100644 --- a/lib/crewai/src/crewai/types/usage_metrics.py +++ b/lib/crewai/src/crewai/types/usage_metrics.py @@ -120,12 +120,9 @@ class UsageMetrics(BaseModel): reconciling here, ``prompt_tokens`` and ``total_tokens`` undercount billed usage on cached Anthropic workloads. """ - return ( - "input_tokens" in usage_data - and ( - "cache_read_input_tokens" in usage_data - or "cache_creation_input_tokens" in usage_data - ) + return "input_tokens" in usage_data and ( + "cache_read_input_tokens" in usage_data + or "cache_creation_input_tokens" in usage_data ) @staticmethod