mirror of https://github.com/astral-sh/ruff
Format
This commit is contained in:
parent
d8cfc7e84f
commit
1a657731dd
|
|
@ -364,11 +364,11 @@ IfStatement: ast::Stmt = {
|
||||||
// Determine last else:
|
// Determine last else:
|
||||||
let mut last = s3.map(|s| s.2).unwrap_or_default();
|
let mut last = s3.map(|s| s.2).unwrap_or_default();
|
||||||
let end_location = last
|
let end_location = last
|
||||||
.last()
|
.last()
|
||||||
.or_else(|| s2.last().and_then(|last| last.4.last()))
|
.or_else(|| s2.last().and_then(|last| last.4.last()))
|
||||||
.or_else(|| body.last())
|
.or_else(|| body.last())
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.end_location;
|
.end_location;
|
||||||
// handle elif:
|
// handle elif:
|
||||||
for i in s2.into_iter().rev() {
|
for i in s2.into_iter().rev() {
|
||||||
let x = ast::Stmt {
|
let x = ast::Stmt {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue