(buffer: list[str])
| 241 | |
| 242 | |
| 243 | def _get_first_indentation(buffer: list[str]) -> str | None: |
| 244 | indented_line_start = None |
| 245 | for i in range(len(buffer)): |
| 246 | if (i < len(buffer) - 1 |
| 247 | and buffer[i] == "\n" |
| 248 | and buffer[i + 1] in " \t" |
| 249 | ): |
| 250 | indented_line_start = i + 1 |
| 251 | elif indented_line_start is not None and buffer[i] not in " \t\n": |
| 252 | return ''.join(buffer[indented_line_start : i]) |
| 253 | return None |
| 254 | |
| 255 | |
| 256 | def _should_auto_indent(buffer: list[str], pos: int) -> bool: |
no test coverage detected
searching dependent graphs…