Skip to content

Commit

Permalink
Merge pull request nltk#6 from bdbaddog/master
Browse files Browse the repository at this point in the history
Fixes needed by SCons project to run with python 2.7
  • Loading branch information
stevenbird authored Dec 9, 2018
2 parents eb9befb + f287187 commit ca5479a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/epydoc/docintrospecter.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ def introspect_class(cls, class_doc, module_name=None):
for base in bases:
basedoc = introspect_docs(base)
class_doc.bases.append(basedoc)
if not hasattr(basedoc,'subclasses'):
basedoc.subclasses=[]
basedoc.subclasses.append(class_doc)

bases.reverse()
Expand Down
2 changes: 1 addition & 1 deletion src/epydoc/docstringparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def report_errors(api_doc, docindex, parse_errors, field_warnings):
message = error.descr()
messages.setdefault(message, []).append(error.linenum())
message_items = list(messages.items())
message_items.sort(key=lambda a,b:six.cmp(min(a[1]), min(b[1])))
message_items.sort(lambda a,b:six.cmp(min(a[1]), min(b[1])))
for message, linenums in message_items:
linenums = [n for n in linenums if n is not None]
if len(linenums) == 0:
Expand Down

0 comments on commit ca5479a

Please sign in to comment.