Override fmt_dangling_comments for frequent nodes (#6551)

This commit is contained in:
Micha Reiser
2023-08-14 15:29:05 +02:00
committed by GitHub
parent 680d171ae5
commit fc0c9507d0
3 changed files with 12 additions and 1 deletions

View File

@@ -69,6 +69,11 @@ impl FormatNodeRule<ExprCompare> for FormatExprCompare {
in_parentheses_only_group(&inner).fmt(f)
}
fn fmt_dangling_comments(&self, _node: &ExprCompare, _f: &mut PyFormatter) -> FormatResult<()> {
// Node can not have dangling comments
Ok(())
}
}
impl NeedsParentheses for ExprCompare {