-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Content unnecessarily split onto multiple lines #1184
Copy link
Copy link
Closed
Labels
R: not a bugThis is deliberate behavior of Black.This is deliberate behavior of Black.
Description
Describe the bug A clear and concise description of what the bug is.
Black is spreading content across multiple lines that would easily fit on a single line. In particular the first example from the "how black wraps lines" in the docs here is not reproduced with black==19.10b0
To Reproduce Steps to reproduce the behavior:
- Make a Python file (
demo.py) containing the snippet from the docs
j = [1,
2,
3,
]- Run
black demo.py(default arguments) - Resulting file is formatted as
j = [
1,
2,
3,
]Expected behavior A clear and concise description of what you expected to happen.
According to the docs, and as was the case in earlier versions of Black (e.g. 19.3b0) output should be
j = [1, 2, 3]Personally I think this is a much more reasonable output in this case.
Environment (please complete the following information):
- Version:
19.10b0 - OS and Python version: macOS, Python 3.7.4
Does this bug also happen on master?
Yes. See here
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
R: not a bugThis is deliberate behavior of Black.This is deliberate behavior of Black.