(command: object, *, max_length: int = 140)
| 170 | |
| 171 | |
| 172 | def _compact_command(command: object, *, max_length: int = 140) -> str: |
| 173 | normalized = " ".join(str(command or "").split()) |
| 174 | if len(normalized) <= max_length: |
| 175 | return normalized |
| 176 | return normalized[: max(0, max_length - 3)].rstrip() + "..." |
| 177 | |
| 178 | |
| 179 | def _unique_sibling_path(path: Path) -> Path: |
no test coverage detected