Dict formatting with 0.16.1
See original GitHub issueDict formatting seems weird under 0.16.1. The value is added to a new line under the key, this seems somewhat silly, especially when the line length doesn’t exceed column_limit
. I don’t see a tunable to disable this.
[style]
based_on_style = pep8
column_limit = 79
x = {
- 'ansible_host': '127.0.0.1',
- 'ansible_port': 2222,
- 'ansible_user': 'vagrant',
- 'ansible_private_key_file': '"/foo/bar"',
- 'connection': 'ssh',
+ 'ansible_host':
+ '127.0.0.1',
+ 'ansible_port':
+ 2222,
+ 'ansible_user':
+ 'vagrant',
+ 'ansible_private_key_file':
+ '"/foo/bar"',
+ 'connection':
+ 'ssh',
'ansible_ssh_extra_args': ('-o UserKnownHostsFile=/dev/null '
'-o ControlMaster=auto '
'-o ControlPersist=60s '
Issue Analytics
- State:
- Created 6 years ago
- Reactions:29
- Comments:16 (6 by maintainers)
Top Results From Across the Web
https://docs.python.org/2/library/stdtypes.html
No information is available for this page.
Read more >pandas.to_datetime — pandas 0.25.3 documentation
If True and no format is given, attempt to infer the format of the datetime strings, and if it can be inferred, switch...
Read more >Python API - xlwings Documentation
Clears the content of the whole sheet but leaves the formatting. clear_formats()#. Clears the format of the whole sheet but leaves the content....
Read more >Sparse matrices (scipy.sparse) — SciPy v1.9.3 Manual
A sparse array in COOrdinate format. ... Return the lower triangular portion of a matrix in sparse format ... dok_matrix: Dictionary of Keys...
Read more >yapf · PyPI
Therefore, if you format Python 3 code with YAPF, run YAPF itself under Python ... It's also possible to do the same on...
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
@r00tat I use
And it seems to give you the desired formatting.
@r00tat I did the same as you and it looks the style is not applied. This is definitely a separate issue, so I suggest raising another issue. I would suggest using a minimal configuration triggering an error:
.style.yapf:
test.py:
Now moving .style.yapf to setup.cfg:
Lines “aaaaaaaaaaaaa”, and “bbbbbbbbbbbbb…” are not indented.