mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-26 06:03:19 +00:00
fix(azure_ai): annotate cast() with cast-ok reason for LIT006 budget
The PR's unchecked cast(dict, message) added a LIT006 violation (type_discipline_gate.py), pushing the LIT006 total to 1117 over the 1111 ceiling. This gate runs after the UP006 gate and was not reached in prior runs because the UP006 gate failed first; now that UP006 passes it runs and catches this. Add a cast-ok suppression with a reason, as the gate requires (AllMessageValues is a union of TypedDicts and pop/strip need a mutable mapping).
This commit is contained in:
parent
727206405d
commit
e747b4d6ce
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ def _strip_unsupported_message_fields(message: AllMessageValues) -> None:
|
|||
the adapter attaches inside ``tool_calls[].function``) are stripped
|
||||
recursively so nested tool-call signatures are removed too.
|
||||
"""
|
||||
m = cast(dict, message)
|
||||
m = cast(dict, message) # cast-ok: AllMessageValues is a union of TypedDicts; pop/strip need a mutable mapping
|
||||
for field in _RECURSIVELY_STRIPPED_FIELDS:
|
||||
filter_value_from_dict(m, field)
|
||||
for field in _TOP_LEVEL_OUTPUT_ONLY_FIELDS:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue