mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
Enable function2
test (#3083)
This commit is contained in:
parent
90c04b9cff
commit
a6eb60cdd5
4 changed files with 173 additions and 56 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue