You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the issue here is that we set first in CanOmitOptionalParenthesesVisitor to the UnaryExpr.value instead of the unary expression itself. I think we have the same problem for other nodes that start with a token (if expression, dict etc)
Okay I think I understand it now... It is an issue with can_omit_parentheses. Black uses different rules to test if the first or last node have parentheses.
first: Needs to start with parentheses. That excludes call expressions.
last: Needs to end with parentheses. Call, lists, etc
Black:
Ruff:
The text was updated successfully, but these errors were encountered: