(value: Any, maximum_bytes: int)
| 3340 | |
| 3341 | |
| 3342 | def bounded_output_text(value: Any, maximum_bytes: int) -> str: |
| 3343 | encoded = str(value).encode("utf-8")[:maximum_bytes] |
| 3344 | return encoded.decode("utf-8", errors="ignore") |
| 3345 | |
| 3346 | |
| 3347 | def read_finding_details(value: str) -> dict[str, Any]: |