Skip to content

Commit 0e3bdc1

Browse files
committed
record new behavior
1 parent 6808b2f commit 0e3bdc1

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__while_else_indented_comment_between_branches.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ expression: comments.debug(test_case.source_code)
44
---
55
{
66
Node {
7-
kind: StmtPass,
8-
range: 41..45,
9-
source: `pass`,
7+
kind: StmtWhile,
8+
range: 0..45,
9+
source: `while True: pass`,
1010
}: {
11-
"leading": [
11+
"leading": [],
12+
"dangling": [
1213
SourceComment {
1314
text: "# comment",
1415
position: OwnLine,
1516
formatted: false,
1617
},
1718
],
18-
"dangling": [],
1919
"trailing": [],
2020
},
2121
}

crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__while_else_very_indented_comment_between_branches.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ expression: comments.debug(test_case.source_code)
44
---
55
{
66
Node {
7-
kind: StmtPass,
8-
range: 49..53,
9-
source: `pass`,
7+
kind: StmtWhile,
8+
range: 0..53,
9+
source: `while True:⏎`,
1010
}: {
11-
"leading": [
11+
"leading": [],
12+
"dangling": [
1213
SourceComment {
1314
text: "# comment",
1415
position: OwnLine,
1516
formatted: false,
1617
},
1718
],
18-
"dangling": [],
1919
"trailing": [],
2020
},
2121
}

crates/ruff_python_formatter/tests/snapshots/format@statement__while.py.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ while (
9090
9191
while True:
9292
pass
93+
# leading for `else`
9394
else:
94-
# leading for `else`
9595
pass
9696
9797
while True:
9898
pass
99+
# trailing
99100
else:
100-
# trailing
101101
pass
102102
103103

0 commit comments

Comments
 (0)