-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
R: duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
First of all - thank you for making black!
I'm applying it to my main project (Gammapy) today.
There are a few examples where I think that black gives non-ideal results, and wanted to mention them here. If those have been discussed before, I apologise, please just close this issue.
I think this is nice:
things = OrderedDict([
('ham', 'spam'),
('bla bla bla bla', 'some more text here'),
])and putting [ and ] on a separate line like black does is not an improvement:
things = OrderedDict(
[
("ham", "spam"),
("bla bla bla bla", "some more text here"),
]
)I read through the black description, and see that this is intended behaviour to always add line breaks on the outermost parenthesis. Is it possible / up for debate to change this in some cases?
This is another case:
text = """
Hello hallo
allo allo
"""[1:-1]where black gives this output:
text = """
Hello hallo
allo allo
"""[
1:-1
]
and I think the input formatting is better readable than the black output.
Cito, benjaminsingleton and rszalski
Metadata
Metadata
Assignees
Labels
R: duplicateThis issue or pull request already existsThis issue or pull request already exists