Apply ruff fixes

This commit is contained in:
Hugh Brown
2026-03-03 22:46:39 -07:00
committed by Abhimanyu Saharan
parent 0896b0772d
commit a66765a514
3 changed files with 8 additions and 10 deletions

View File

@@ -687,9 +687,7 @@ def _sanitize_field(value: str) -> str:
Prevents prompt injection via skill name or URL fields that could
break out of the structured data section into the instruction section.
"""
sanitized = "".join(
ch if ch.isprintable() and ch not in {"\n", "\r"} else " " for ch in value
)
sanitized = "".join(ch if ch.isprintable() and ch not in {"\n", "\r"} else " " for ch in value)
# Normalize any runs of whitespace (including tabs) down to single spaces.
sanitized = re.sub(r"\s+", " ", sanitized)
return sanitized.strip()