Skip to content

Commit

Permalink
Small chore
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer committed Jul 11, 2023
1 parent 3b57d8b commit aaffdac
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions crates/ruff_python_formatter/src/statement/stmt_assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ impl FormatNodeRule<StmtAssert> for FormatStmtAssert {
test,
msg,
} = item;

write!(
f,
[
text("assert"),
space(),
test.format().with_options(Parenthesize::IfBreaks)
]
)?;

if let Some(msg) = msg {
write!(
f,
[
text("assert"),
space(),
test.format().with_options(Parenthesize::IfBreaks),
text(","),
space(),
msg.format().with_options(Parenthesize::IfBreaks)
]
)
} else {
write!(
f,
[
text("assert"),
space(),
test.format().with_options(Parenthesize::IfBreaks)
]
)
)?;
}

Ok(())
}
}

0 comments on commit aaffdac

Please sign in to comment.