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:
Quinn Xu 2026-10-05 10:12:27 -07:00
parent 058fd590f7
commit a29a55bd68
No known key found for this signature in database
GPG key ID: BE28F31078A13997

View file

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