ruff
ca2bb200 - Fallback to end-of-file if ends in trailing continuation (#6789)

Commit
2 years ago
Fallback to end-of-file if ends in trailing continuation (#6789) ## Summary Given: ```python def end_of_file(): if False: return 1 x = 2 \ ``` Then when searching for the end of the `x = 2` statement, we'd reach a panic as we'd hit the last line (`\\`) and abort, since the universal iterator doesn't return trailing newlines. Instead, we should just use the end of the file as the fallback. Closes https://github.com/astral-sh/ruff/issues/6787. ## Test Plan `cargo test`
Author
Parents
Loading