mirror of https://github.com/astral-sh/ruff
Trim trailing whitespace when extracting isort directives (#1715)
This commit is contained in:
parent
07f72990a9
commit
76a366e05a
|
|
@ -3,7 +3,10 @@ import f
|
|||
|
||||
# isort: split
|
||||
|
||||
import a
|
||||
import b
|
||||
import c
|
||||
import d
|
||||
|
||||
# isort: split
|
||||
|
||||
import a
|
||||
import b
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ pub fn extract_isort_directives(lxr: &[LexResult]) -> IsortDirectives {
|
|||
continue;
|
||||
};
|
||||
|
||||
let comment_text = comment_text.trim_end();
|
||||
if comment_text == "# isort: split" {
|
||||
splits.push(start.row());
|
||||
} else if comment_text == "# isort: skip_file" {
|
||||
|
|
|
|||
Loading…
Reference in New Issue