refactor(logging): drop Any cast in failure redaction flag lookup

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yucheng 2026-09-29 11:32:19 +00:00
parent 37e483d39d
commit a9cbee17c6

View file

@ -233,9 +233,7 @@ def should_redact_failed_request(request_data: Mapping[str, object]) -> bool:
else next(
(
slot["turn_off_message_logging"]
for _, slot in iter_client_callback_metadata_dicts(
cast(dict[str, Any], request_data) # cast-ok: the helper only reads mapping keys
)
for _, slot in iter_client_callback_metadata_dicts(dict(request_data))
if "turn_off_message_logging" in slot
),
None,