From 32c47acd6776a91e9a87d0ff307bcf987c5f44d9 Mon Sep 17 00:00:00 2001 From: STiFLeR7 Date: Thu, 10 Sep 2026 08:49:38 +0530 Subject: [PATCH] fix(a2a): add ANN401 per-file ignore for common_utils.py serialize_a2a_data_part's data param is an A2A data-kind part's payload, which the protocol defines as arbitrary JSON-serializable content with no fixed shape. object was not viable since json.dumps requires the narrower JSON-value types. Resolves the ruff-strict ANN401 budget breach from PR #28593's new Any-typed parameter. --- ruff-strict.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruff-strict.toml b/ruff-strict.toml index ae092bdde7d..8afde630fd0 100644 --- a/ruff-strict.toml +++ b/ruff-strict.toml @@ -30,6 +30,11 @@ external = [ # grows over time; typing it concretely (`object`) broke that forwarding call outright — # basedpyright turned every named param into a reportArgumentType error. Any is correct here. "litellm/proxy/guardrails/guardrail_hooks/alice/alice.py" = ["ANN401"] +# `serialize_a2a_data_part`'s `data` param is the payload of an A2A `data`-kind part, +# which the A2A protocol defines as arbitrary JSON-serializable content with no fixed +# shape. `object` was not viable: json.dumps requires the narrower JSON-value types, +# so typing it `object` just moves the Any into a cast at every call site instead. +"litellm/llms/a2a/common_utils.py" = ["ANN401"] [lint.mccabe] max-complexity = 15