-
Notifications
You must be signed in to change notification settings - Fork 756
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
pep8 raises "E111" even for "commented blocks" #426
Comments
Can you possibly share some more context? At least from what you quoted above, the comments are indented by one space each? That should be what pep8 is complaining about (the comments need to be indented by a multiple of four).
|
I have a script with some blocks commented as shown below:
Now when I am running pep8 on this script it raises "E111" error. Apparently commented blocks ain't aligned as shown but they are commented. Isn't it expected that if a line is commented then pep8 should ignore it? |
So I normally do # @allowHookSkip
# def checkLongLine(ui, repo, **kwargs):
# '''Prevent the usage of lines more than 140 chars in Acc'''
# for diff in repo['tip'].diff():
# for line in diff.split('\n'):
# if len(line) > 140 and line.startswith('+'):
# print 'More than 140 chars in line: %3s'%line
# return True And pep8 never complains. That said, comments are not auto-ignored by pep8 nor do I believe they should be. |
Ah, no, your comments also need to be aligned to multiples of four spaces. e.g.:
|
Thanks for clearing my doubt. |
Hi,
I find this strange that pep8 raises "E111: indentation is not a multiple of four" even for commented blocks of script e.g.
-some code followed by commented block-
I was expecting "pep8" to ignore commented blocks.
The text was updated successfully, but these errors were encountered: