-
Notifications
You must be signed in to change notification settings - Fork 751
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
E128: Indentation checks could contain exact information #928
Comments
Your description isn't comprehensible to me. Can you add an example of what you're running against, what you're getting and how what you're proposing helps? |
I believe what the original post is asking for is something like this (really ugly example, but): if True:
if (a() and
b()):
print('hi') $ ~/opt/venv/bin/pycodestyle t.py
t.py:3:5: E128 continuation line under-indented for visual indent but OP would like to see $ ~/opt/venv/bin/pycodestyle t.py
t.py:3:5: E128 continuation line under-indented for visual indent (indented 4 spaces, expected 8 or 12 spaces) but I guess that demonstrates another problem, there's multiple things that could be suggested for each code. satisfying one of them may also break another code (for example, 8 spaces is ok for E128 but then triggers E129) |
Indeed. I got the idea from flake8-tabs, which I noticed adds this information (but, unless you want to use tabs, it does nothing else of interest). |
Yes, well I think baby steps towards the right solution is a fair thing to do. Adding "indented 4 spaces but expected 8 or 12 spaces" could be helpful to even someone just new to this tool, let alone a random codebase. As we aggregate the most common pain-points of these hints we can make the hints slightly better to reduce annoyance. |
It could be more helpful for a developer new to a codebase, that perhaps doesn't know the indentation still in use, to be told exactly where the indentation should go.
This could just be added to the end of the error like
(expected 20, got 8)
.The text was updated successfully, but these errors were encountered: