prefer_splitting_right_hand_side_of_assignments preview style (#8943)

This commit is contained in:
Micha Reiser 2023-12-13 12:43:23 +09:00 committed by GitHub
parent 1a65e544c5
commit 45f603000d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1473 additions and 332 deletions

View file

@ -952,7 +952,7 @@ impl OwnParentheses {
/// Differs from [`has_own_parentheses`] in that it returns [`OwnParentheses::NonEmpty`] for
/// parenthesized expressions, like `(1)` or `([1])`, regardless of whether those expression have
/// their _own_ parentheses.
fn has_parentheses(expr: &Expr, context: &PyFormatContext) -> Option<OwnParentheses> {
pub(crate) fn has_parentheses(expr: &Expr, context: &PyFormatContext) -> Option<OwnParentheses> {
let own_parentheses = has_own_parentheses(expr, context);
// If the node has its own non-empty parentheses, we don't need to check for surrounding