-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format StmtAugAssign #5655
Format StmtAugAssign #5655
Conversation
Format statements such as `tree_depth += 1`. This is a statement that does not allow any line breaks, the only thing to be mindful of is to parenthesize the assigned expression
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Please update #4798 or create an issue an link it to the PR so that we keep track of the (at least partially) implemented syntax.
write!( | ||
f, | ||
[ | ||
target.format(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stmt formatting can be so nice. Expressions are the real pain
Summary
Format statements such as
tree_depth += 1
. This is a statement that does not allow any line breaks, the only thing to be mindful of is to parenthesize the assigned expressionJaccard index on django: 0.915 -> 0.918
Test Plan
black tests, and two new tests, a basic one and one that ensures that the child gets parentheses. I ran the django stability check.