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.
This commit is contained in:
STiFLeR7 2026-09-10 08:49:38 +05:30
parent f59de5cff1
commit 32c47acd67
No known key found for this signature in database

View file

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