Enable function2 test (#3083)

This commit is contained in:
Charlie Marsh 2023-02-20 23:37:50 -05:00 committed by GitHub
parent 90c04b9cff
commit a6eb60cdd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 173 additions and 56 deletions

View file

@ -322,7 +322,7 @@ fn format_for(
target: &Expr,
iter: &Expr,
body: &[Stmt],
_orelse: &[Stmt],
orelse: &[Stmt],
_type_comment: Option<&str>,
) -> FormatResult<()> {
write!(
@ -338,7 +338,11 @@ fn format_for(
text(":"),
block_indent(&block(body))
]
)
)?;
if !orelse.is_empty() {
write!(f, [text("else:"), block_indent(&block(orelse))])?;
}
Ok(())
}
fn format_while(