Format target: annotation = value? expressions (#5661)

This commit is contained in:
Micha Reiser 2023-07-11 16:40:28 +02:00 committed by GitHub
parent 0c8ec80d7b
commit f1d367655b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 318 additions and 988 deletions

View file

@ -1,4 +1,4 @@
use crate::builders::{optional_parentheses, PyFormatterExtensions};
use crate::builders::{parenthesize_if_expands, PyFormatterExtensions};
use crate::comments::dangling_node_comments;
use crate::expression::parentheses::Parenthesize;
use crate::{AsFormat, FormatNodeRule, PyFormatter};
@ -36,7 +36,7 @@ impl FormatNodeRule<StmtDelete> for FormatStmtDelete {
}
targets => {
let item = format_with(|f| f.join_comma_separated().nodes(targets.iter()).finish());
optional_parentheses(&item).fmt(f)
parenthesize_if_expands(&item).fmt(f)
}
}
}