-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Consistently wrap two context managers in parens (in --preview). #3589
Conversation
Attaching a diff-shades result: 3589.diff.zip This is from running: diff-shades analyze base.json --work-dir projects-cache --force-preview-style -- --target-version=py39
diff-shades analyze new.json --work-dir projects-cache --force-preview-style -- --target-version=py39
diff-shades compare base.json new.json --diff |
Ah, the diff-shades check on CI is broken? |
Yup. 🙃 |
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.
Two nits, and a question about async with
.
"""Return True if the given leaf starts a with statement.""" | ||
return bool( | ||
leaf.type == token.NAME | ||
and leaf.value == "with" |
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.
Does this also cover async with
? We should treat both of these the same.
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.
Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
@ichard26 FYI I just sent ichard26/diff-shades#11 to fix diff-shades |
Thanks @yilei! I merged the diff-shades change, let's see if that's enough. |
The workflow pulls from the |
Success! |
Kindly ping @JelleZijlstra? |
Ah sorry, I'll resolve the merge conflicts. |
Description
Fixes #3572
Checklist - did you ...
CHANGES.md
if necessary?