Files
Jordan Ritter 2482317ccc style: apply ruff format to Python codebase
320 files reformatted. One-time alignment to match the ruff format
check added to CI in #4812.
2026-05-13 23:10:35 -07:00

6 lines
170 B
Python

def filter_by_schema_keys(obj, schema):
try:
return {k: v for k, v in obj.items() if k in schema or k == "messages"}
except Exception:
return obj