-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
formatterRelated to the formatterRelated to the formatterpreviewRelated to preview mode featuresRelated to preview mode features
Milestone
Description
Implement Black's wrap_multiple_context_managers_in_parens as a preview style. The new style only applies to Py39+.
with \
make_context_manager1() as cm1, \
make_context_manager2() as cm2, \
make_context_manager3() as cm3, \
make_context_manager4() as cm4 \
:
passGets formatted as
with (
make_context_manager1() as cm1,
make_context_manager2() as cm2,
make_context_manager3() as cm3,
make_context_manager4() as cm4,
):
passBlack automatically detects the python version used in a file based on the syntax used. E.g. a file using match statements is Py310+. I'm unsure if we should autodetect the python version based on the syntax or rely on requires-python
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formatterpreviewRelated to preview mode featuresRelated to preview mode features