use_tabs=True does not work for lists and dictionaries
See original GitHub issueWe use_tabs for indentation but continuation_indent_width still uses spaces instead of tabs for lists and dictionaries that are split over multiple lines. If required there should be a separate knob for this which allows setting of tabs vs spaces for lists and dictionaries
``
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:33 (13 by maintainers)
Top Results From Across the Web
Manipulating Lists and Dictionaries in Python - Pluralsight
A dictionary is a mutable, unordered set of key-value pairs where each key must be unique.
Read more >Storing and updating lists in Python dictionaries: why does this ...
Since, all dictionaries are key-value structures, the question's not very clear. ... In this case, we provide the list function so that a...
Read more >List vs Dictionary | 10 Difference Between List and ... - FavTutor
Mutability. Lists are mutable in nature. Dictionaries are mutable, but keys do not allow duplicates ; Creation. List object is created using list...
Read more >How to work with lists and dictionaries in Ansible - Red Hat
Learn how to analyze and use data in lists and dictionaries, a crucial skill for anything you want to do with Ansible.
Read more >5. Data Structures — Python 3.11.1 documentation
Lists are mutable, and their elements are usually homogeneous and are accessed by iterating over the list. A special problem is the construction...
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
@gwelymernans, there are 2 basic school of thoughts (amongst us tabbers=tab users) for continuation alignment
Currently yapf does a very unexpected switchover back to pure spaces for continuation indentation which is probably completely invalid for any tabber.
If yapf has to truly cater to tab users, it will probably have to have a flag for those of us in the 2nd school of mixed indentation
hope I have helped
Thanks for not starting a ‘holy war’ on this 👍 . Ideally, though this may vary even amongst us ‘tabs’ people, I think I would want the continuation indent to be additional to the indent at which the code is at right now. so CONTINUATION_INDENT=1 should result in the code below Eg below