(value: Any, maximum: int, label: str)
| 663 | |
| 664 | |
| 665 | def _bounded_preflight_text(value: Any, maximum: int, label: str) -> str: |
| 666 | if not isinstance(value, str): |
| 667 | raise SystemExit(f"Capability preflight {label} must be text.") |
| 668 | normalized = value.strip() |
| 669 | if not normalized or _javascript_string_length(normalized) > maximum: |
| 670 | raise SystemExit(f"Capability preflight {label} must contain 1 to {maximum} characters.") |
| 671 | return normalized |
| 672 | |
| 673 | |
| 674 | def _javascript_string_length(value: str) -> int: |
no test coverage detected