You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
Traceback (most recent call last):
File "/usr/bin/pep257", line 8, in <module>
sys.exit(main(*parse_options()))
File "/usr/lib/python2.7/site-packages/pep257.py", line 411, in main
for error in check(collected, ignore=options.ignore.split(',')):
File "/usr/lib/python2.7/site-packages/pep257.py", line 394, in check
for error in PEP257Checker().check_source(source, filename):
File "/usr/lib/python2.7/site-packages/pep257.py", line 440, in check_source
module = parse(StringIO(source), filename)
File "/usr/lib/python2.7/site-packages/pep257.py", line 181, in __call__
return self.parse_module()
File "/usr/lib/python2.7/site-packages/pep257.py", line 252, in parse_module
children = list(self.parse_definitions(Module, all=True))
File "/usr/lib/python2.7/site-packages/pep257.py", line 212, in parse_definitions
for definition in self.parse_definitions(class_):
File "/usr/lib/python2.7/site-packages/pep257.py", line 209, in parse_definitions
yield self.parse_definition(class_._nest(token.value))
File "/usr/lib/python2.7/site-packages/pep257.py", line 268, in parse_definition
children = list(self.parse_definitions(class_))
File "/usr/lib/python2.7/site-packages/pep257.py", line 209, in parse_definitions
yield self.parse_definition(class_._nest(token.value))
File "/usr/lib/python2.7/site-packages/pep257.py", line 269, in parse_definition
assert self.current.kind == tk.DEDENT
AttributeError: 'NoneType' object has no attribute 'kind'
The text was updated successfully, but these errors were encountered:
I'm debugging this as we speak.
I found out the problem, still working on a solution.
The problem is after a definition, we expect an indent followed by some stuff and then a dedent.
Unfortunately this doesn't take one-liner definitions into account.
The following test case reproduces the error:
def foo(): return 4
Nurdok
added a commit
to Nurdok/pydocstyle
that referenced
this issue
Jul 21, 2014
This is not holding up my own use of pep257, it's simply a bug I had noticed when I accidentally ran it against dal.py from web2py. I appreciate the fast response though @Nurdok.
Steps to reproduce
pep257
on this fileThe text was updated successfully, but these errors were encountered: