-
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
Add check for over-indented blocks #705
Conversation
Rebased to resolve merge conflicts. |
CHANGES.txt
Outdated
@@ -20,6 +20,7 @@ New checks: | |||
in Python 3.7. PR #684. | |||
* Add E252 error for missing whitespace around equal sign in type annotated | |||
function arguments with defaults values. PR #717. | |||
* Add E117 error for over-indented code blocks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is the right place to add this because 2.4.0 is already released
testsuite/W19.py
Outdated
or trailing whitespace | ||
|
||
or trailing whitespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we wanted to keep those trailing white spaces
In a project with all lines indented 4 spaces, I noticed pycodestyle was not catching code that was accidentally indented two levels (8 spaces). The over indentation was unintended and can be caught during static analysis. Fixes #430
Thanks for the review. I've updated the PR with the suggested changes. 🙂 |
Hi @jdufresne @sigmavirus24, this change has started causing E117 to be reported for any files containing tabs. My guess is that this change sees them as being 8 spaces and thus being overindented. For now we will simply disable this error, but I think this should be addressed and I'll open a separate issue for this. |
In a project with all lines indented 4 spaces, I noticed pycodestyle was not catching code that was accidentally indented two levels (8 spaces). The over indentation was unintended and can be caught during static
analysis.
Fixes #430