Conversation
|
d87ba74 to
390adb4
Compare
786a2e1 to
97919f3
Compare
| false | ||
| } else if visitor.max_precedence == OperatorPrecedence::None && expr.is_lambda_expr() { | ||
| // Micha: This seems to exclusively apply for lambda expressions where the body ends in a subscript. | ||
| } else if visitor.max_precedence == OperatorPrecedence::None { |
There was a problem hiding this comment.
It seems I don't understand these rules after all :(
97919f3 to
929e728
Compare
929e728 to
7940671
Compare
| /// * There's a single non-parenthesized item. The function returns [`ParenthesizeWith::Optional`] | ||
| /// if the parentheses can be omitted if breaking around parenthesized sub-expressions is sufficient | ||
| /// to make the expression fit. It returns [`ParenthesizeWith::IfExpands`] otherwise. | ||
| /// * The only item is parenthesized and has comments. |
There was a problem hiding this comment.
That's a lot of cases, nice job figuring it out...
7940671 to
dc20d2a
Compare
Summary
This PR implements Black's
wrap_multiple_context_managers_in_parensandimproved_async_statements_handlingpreview styles.Closes #8889
Closes #8890
Test Plan