-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
C: target versionRelated to --target-version, e.g. autodetectionRelated to --target-version, e.g. autodetectionF: linetoolongBlack makes our lines too longBlack makes our lines too longF: parenthesesToo many parentheses, not enough parentheses, and so on.Too many parentheses, not enough parentheses, and so on.S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedThe changes in this design / enhancement issue have been accepted and can be implementedT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
Long with statements are not not broken into several lines:
Something like this should be OK, according to PEP8
with averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater, \
averylongnameyoucantsplit as youcheater:
print("hello")But black formats its as:
with averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater, averylongnameyoucantsplit as youcheater:
print("hello")Operating system: macOS 10.14.2
Python version: 3.7.2
Black version: 18.9b0
Does also happen on master: Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C: target versionRelated to --target-version, e.g. autodetectionRelated to --target-version, e.g. autodetectionF: linetoolongBlack makes our lines too longBlack makes our lines too longF: parenthesesToo many parentheses, not enough parentheses, and so on.Too many parentheses, not enough parentheses, and so on.S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedThe changes in this design / enhancement issue have been accepted and can be implementedT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?