ruff
dbf003fd - importer: skip whitespace between comments at start of file (#6523)

Commit
2 years ago
importer: skip whitespace between comments at start of file (#6523) ## Summary When adding an import, such as when fixing `I002`, ruff doesn't skip whitespace between comments, but isort does. See this issue for more detail: https://github.com/astral-sh/ruff/issues/6504 This change would fix that by skipping whitespace between comments in `Insertion.start_of_file()`. ## Test Plan I added a new test, `comments_and_newlines`, to verify this behavior. I also ran `cargo test` and no existing tests broke. That being said, this is technically a breaking change, as it's possible that someone was relying on the previous behavior.
Author
Parents
Loading