Skip to content

Commit

Permalink
Discard changes to crates/ruff_python_formatter/src/lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Oct 27, 2023
1 parent eb5ab97 commit a202ad9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions crates/ruff_python_formatter/src/lib.rs
Expand Up @@ -206,13 +206,13 @@ if True:
#[test]
fn quick_test() {
let source = r#"
def f():
# fmt: off
def main() -> None:
if True:
with_semicolon = 20 \
; # comment
some_very_long_variable_name_abcdefghijk = Foo()
some_very_long_variable_name_abcdefghijk = some_very_long_variable_name_abcdefghijk[
some_very_long_variable_name_abcdefghijk.some_very_long_attribute_name
== "This is a very long string abcdefghijk"
]
"#;
let source_type = PySourceType::Python;
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff_python_formatter/src/verbatim.rs
Expand Up @@ -400,7 +400,7 @@ fn write_suppressed_statements<'a>(
let end = loop {
if let Some(comment) = comments.trailing(current).last() {
break comment.end();
} else if let Some(child) = AnyNodeRef::from(current).last_child_in_body() {
} else if let Some(child) = current.last_child_in_body() {
current = child;
} else {
break trailing_semicolon(current, source)
Expand Down

0 comments on commit a202ad9

Please sign in to comment.