Add knob to never ever break line after "'dictkey':"
See original GitHub issueCurrently if one or more of dict’s entries are longer than column_limit
(or simply contain multiline string), yapf will break line after all dict’s keys in dict.
I’ve tried disabling indent_dictionary_value
but this makes yapf just align value right under key, which is something I dislike more than breaking line and inlining value 😉
Eventually, I’ve developed custom utility for my project that performs my way cleanup after yapf, but after 12h of programmering I can’t help but feel that its hacky and fragile, which is why I’m opening ticket here.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:20 (5 by maintainers)
Top Results From Across the Web
python - Proper way of breaking line accessing dictionary
I am try to conform to pep8 directives and therefore to break the following line: config_data_dict[ ...
Read more >Python Add to Dictionary [Easy Step-By-Step] - DigitalOcean
Since Python dictionaries are mutable, when you use the assignment operator, you're simply adding new keys to the datastructure. dict[key] = ...
Read more >Dictionaries in Python - Real Python
In this Python dictionaries tutorial, you'll cover the basic characteristics and learn how to access and manage dictionary data. Once you have finished...
Read more >sec_E_SB_ELA_G8.pdf - TN.gov
45 But if he beat a sure, steady, ever faster rhythm, then, then their knees would come up in a long line down...
Read more >Anagram Solver - Decode & Find All Solutions | WordFinder®
Our free anagram solver is exactly what you need to unscramble letters and form new words. This easy-to-use tool will work its magic...
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
Yes, I’d want that to not split, or if it does, it should be the only key that splits. The problem is right now you go from this:
to this:
Where I’d prefer either not splitting that line at all, or
@gwelymernans , any plans to integrate https://github.com/google/yapf/commit/848efddd27a8547ecce0876eeed12c197a3d4234 -et-al? Or should I not expect that to reach master?