Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax E127 with dictionary values: allow extra indent #785

Open
blueyed opened this issue Jul 26, 2018 · 1 comment
Open

Relax E127 with dictionary values: allow extra indent #785

blueyed opened this issue Jul 26, 2018 · 1 comment

Comments

@blueyed
Copy link

blueyed commented Jul 26, 2018

Currently pycodestyle will complain about the following:

mydict = {12345:
              'foo'}

t-61.py:2:15: E127 continuation line over-indented for visual indent

We are about to change this in Vimjas/vim-python-pep8-indent#61, and there has been some discussion in python/peps#113 - resulting in keeping this out of PEP8 itself (i.e. undefined).

I think pycodestyle should handle this in a relaxed way, and allow for an extra indentation level for dictionary values (after : on the previous line).

@sigmavirus24
Copy link
Member

I'm not convinced this will make people happy. As was pointed out in the peps repo, this seems to be a fringe issue. It's not apparent that the added complexity of allowing for this will result in a happier group of users. In fact, allowing this may seem more like a regression than not to some. I'd be happy to review a PR that makes this less strict here without regressing the rest of the check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants