Skip to content
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 format async statements similar to their non-async version. #3609

Merged
merged 3 commits into from Mar 16, 2023

Conversation

yilei
Copy link
Contributor

@yilei yilei commented Mar 16, 2023

Description

Fixes #3591

In addition, other formatting to non-async version of the corresponding statement is also applied, such as removing unnecessary parens.

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

CHANGES.md Outdated Show resolved Hide resolved
src/black/nodes.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! (apart from two minor things I commented)

yilei and others added 2 commits March 16, 2023 12:42
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@github-actions
Copy link

diff-shades reports zero changes comparing this PR (aa872c1) to main (71a2daa).


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra JelleZijlstra merged commit fc6cea0 into psf:main Mar 16, 2023
44 checks passed
@yilei yilei deleted the async_cm branch March 16, 2023 23:01
copybara-service bot pushed a commit to google/pyink that referenced this pull request Mar 17, 2023
…n unchanged lines might have their leading space normalized.

This is also required for the new async handling introduced in psf#3609

PiperOrigin-RevId: 517517272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preview style: async with context managers aren't wrapped in parentheses
2 participants