-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
F: linebreakHow should we split up lines?How should we split up lines?F: linetoolongBlack makes our lines too longBlack makes our lines too longT: bugSomething isn't workingSomething isn't working
Description
Describe` the bug
In my python file a line with more than 80 characters exists but black doesn't split the line into multi lines due the line length constraint.
To Reproduce
the is my "test.py" file.
graph_path_expressions_in_local_constraint_refinements = [
graph_path_expression
for refined_constraint in self._local_constraint_refinements.values()
if refined_constraint is not None
for graph_path_expression in refined_constraint.condition_as_predicate.variables
]
Run Black:$ black -l 79 --preview test.py
All done! ✨ 🍰 ✨
Expected behavior
This is the result which i get from yapf and it is ok for me.
graph_path_expressions_in_local_constraint_refinements = [
graph_path_expression for refined_constraint in
self._local_constraint_refinements.values()
if refined_constraint is not None for graph_path_expression in
refined_constraint.condition_as_predicate.variables
]
but black doesn't make any changes and gives the below result:
graph_path_expressions_in_local_constraint_refinements = [
graph_path_expression
for refined_constraint in self._local_constraint_refinements.values()
if refined_constraint is not None
for graph_path_expression in refined_constraint.condition_as_predicate.variables
]
Environment
- Black's version: black, 22.12.0 (compiled: yes)
- OS and Python version: Ubuntu 18.04/Python 3.8.16
MetRonnie, wyardley and sataset
Metadata
Metadata
Assignees
Labels
F: linebreakHow should we split up lines?How should we split up lines?F: linetoolongBlack makes our lines too longBlack makes our lines too longT: bugSomething isn't workingSomething isn't working