mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
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:
parent
f59de5cff1
commit
32c47acd67
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue