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 29, 2023
1 parent e5789ec commit b2d8b92
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 b2d8b92

Please sign in to comment.