-
Notifications
You must be signed in to change notification settings - Fork 189
IndentationError -- #32
Comments
That means that syntax of your file is incorrect. pep257 is using Python tokenize module, which raises this error. |
Thanks for the reply, That is right. I a have issue with my file which is been checked. But that should be reported as a error instead of halting my execution. In a way other things are reported. |
I'm not sure it should report that, pep257 checks docstrings, not Python syntax. |
I think it should not be halting the execution for python syntax errors, instead raise a exception or silently pass (Which is bad again) . I am looking at how to get around, will post back. Thanks |
This might be fixed by 3dba783 |
@anupkalburgi Would it be possible for you to verify whether 3dba783 fixes your issue? |
I think that in a real world most users will first check the code with pyflakes and pep8 and only if those pass will also try pep257... if the python file is not valid.. tough titty.. use proper tool for that. |
This issue is quite old and in any case I don't think a docstring checker has any business going over invalid Python files. I'm closing this issue. If this pops up again, feel free to open a new one. |
While we run pep257.check_files(files). ( API)
It is right to detect indentation problem. But then it should not be stopping the execution. How about we handle this exception and report it in the output ? or its intentionally left like that ?
Or am i missing some config ?
File "/Users/anupkalburgi/active/active/lib/python2.7/site-packages/pep257.py", line 197, in parse_top_level
kind, value, (line, char), _, _ = next(token_gen)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tokenize.py", line 351, in generate_tokens
("", lnum, pos, line))
File "", line 9
except:
The text was updated successfully, but these errors were encountered: