mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
fix(guardrails): drop stale mutable-ok marker in GuardrailToolParam serializer
The dict comprehension is not flagged by the mutable-collection rule, so the suppression comment suppressed nothing and tripped LIT013.
This commit is contained in:
parent
058fd590f7
commit
a29a55bd68
1 changed files with 1 additions and 3 deletions
|
|
@ -29,9 +29,7 @@ class GuardrailToolParam(BaseModel):
|
|||
data: Final[Mapping[str, object]] = handler(self)
|
||||
if not isinstance(data, dict) or data.get("type") is not None:
|
||||
return data
|
||||
return { # mutable-ok: pydantic's json serializer rejects a mapping that is not a dict
|
||||
key: value for key, value in data.items() if key != "type"
|
||||
}
|
||||
return {key: value for key, value in data.items() if key != "type"}
|
||||
|
||||
|
||||
class GenericGuardrailAPIMetadata(TypedDict, total=False):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue