(text: str)
| 58 | |
| 59 | |
| 60 | def _strip_final_indent(text: str) -> str: |
| 61 | # kill spaces and tabs at the end, but only if they follow '\n'. |
| 62 | # meant to remove the auto-indentation only (although it would of |
| 63 | # course also remove explicitly-added indentation). |
| 64 | short = text.rstrip(" \t") |
| 65 | n = len(short) |
| 66 | if n > 0 and text[n - 1] == "\n": |
| 67 | return short |
| 68 | return text |
| 69 | |
| 70 | |
| 71 | def _clear_screen(): |
no test coverage detected