From 6b317c5a81f0e82cf42728513393259bfe880b29 Mon Sep 17 00:00:00 2001 From: Praveen Ghuge Date: Wed, 13 May 2026 22:07:20 +0530 Subject: [PATCH] fix(mavvrik): fix mypy type errors in __init__.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change type: ignore[union-attr] → type: ignore[attr-defined] for scheduler.add_job() call - Fix float+Decimal operand error by casting each polars sum() separately with int() Co-Authored-By: Claude Sonnet 4.6 (1M context) --- litellm/integrations/mavvrik/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/integrations/mavvrik/__init__.py b/litellm/integrations/mavvrik/__init__.py index 4fdb858f70c..9ad0beaf217 100644 --- a/litellm/integrations/mavvrik/__init__.py +++ b/litellm/integrations/mavvrik/__init__.py @@ -62,7 +62,7 @@ def _schedule_job( ) uploader = Uploader(client=client) orchestrator = Orchestrator(client=client, uploader=uploader) - scheduler.add_job( # type: ignore[union-attr] + scheduler.add_job( # type: ignore[attr-defined] orchestrator.run, "interval", minutes=MAVVRIK_EXPORT_INTERVAL_MINUTES, @@ -411,7 +411,7 @@ class Service: total_cost = float(df["spend"].sum() or 0.0) if "spend" in df.columns else 0.0 total_tokens = ( - int((df["prompt_tokens"].sum() or 0) + (df["completion_tokens"].sum() or 0)) + int(df["prompt_tokens"].sum() or 0) + int(df["completion_tokens"].sum() or 0) if "prompt_tokens" in df.columns and "completion_tokens" in df.columns else 0 )