Gets the next valid character index in `lines`, if the current location is not valid. Handles empty lines.
(lineno, col)
| 869 | return _byte_offset_to_character_offset(lines[lineno], offset) |
| 870 | |
| 871 | def next_valid_char(lineno, col): |
| 872 | """Gets the next valid character index in `lines`, if |
| 873 | the current location is not valid. Handles empty lines. |
| 874 | """ |
| 875 | while lineno < len(lines) and col >= len(lines[lineno]): |
| 876 | col = 0 |
| 877 | lineno += 1 |
| 878 | assert lineno < len(lines) and col < len(lines[lineno]) |
| 879 | return lineno, col |
| 880 | |
| 881 | def increment(lineno, col): |
| 882 | """Get the next valid character index in `lines`.""" |
no outgoing calls
no test coverage detected
searching dependent graphs…