How to prevent YAPF from joining lines in dictionaries and lists?
See original GitHub issueYAPF converts
DJANGO_TEMPLATES_OPTIONS = {
"context_processors": []
}
to
DJANGO_TEMPLATES_OPTIONS = {"context_processors": []}
and I cannot find the option to disable such behavior.
Is it possible?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How to configure YAPF to use hanging indentation for long ...
Check this: SPLIT_BEFORE_FIRST_ARGUMENT If an argument / parameter list is going to be split, then split before the first argument. yapf ...
Read more >yapf/yapflib/style.py - platform/external/yapf - Git at Google
Allow dictionary keys to exist on multiple lines. For example: ... Disable the heuristic which places each list element on a separate line....
Read more >yapf · PyPI
Disable the heuristic which places each list element on a separate line if the list is comma-terminated. EACH_DICT_ENTRY_ON_SEPARATE_LINE. Place each dictionary ...
Read more >How to automate Python code formatting | by AlexV - Medium
Dictionaries should have a key and value on each line with a comma at the end. ... Then to combine this with YAPF...
Read more >Code Style. Python | PyCharm Documentation - JetBrains
The left-hand pane contains the list of exceptions (Keep when reformatting), ... If your code contains lines that are shorter than a standard...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would love to see this as well. A case I keep coming across:
Becomes
Which is less readable in my opinion.
Any update on ensuring tuple elements are each on their own line?