Skip to content

Preview style: async with context managers aren't wrapped in parentheses #3591

Closed
@yilei

Description

#3489 wraps multiple context managers in parentheses when targeting Python 3.9+, but async with statements aren't handled.

We noticed this in the review of #3589, but the fix is different enough that I'm filing a separate issue and will send a follow-up PR.

Example: https://black.vercel.app/?version=stable&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AIWAK9dAD2IimZxl1N_WmufDs0LojAMwSd5y6tVHFECi48em1NmrZSWd-aOQDsyxUoj0wG4N0KjynelfrUIzSWL64h5VoX_mCOwgMPULx38--l2ByPDULdy3kY55NpHvpodxXDskAGNjzDUowTiDYEk1Nqn0zKozBat4Jr52JOK7_c0zbTbJlm2bGELr0genqmpOYe0Veq-1N1caP91OmdWsqLjL9f2ZG7iyYFCy51v8cbzDGQAACCNqwSsCCbzAAHLAZcEAADbYoSiscRn-wIAAAAABFla

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    T: styleWhat do we want Blackened code to look like?

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions