gendoc.py: Support modules w/o functions and/or classes.
I.e. don't assume that both are always present.
This commit is contained in:
parent
a23475979b
commit
c10a4405cd
@ -228,11 +228,13 @@ class DocModule(DocItem):
|
||||
s.append('# module {}'.format(self.name))
|
||||
s.append('')
|
||||
s.append(super().dump())
|
||||
if self.functions:
|
||||
s.append('')
|
||||
s.append('## Functions')
|
||||
for f in sorted(self.functions.values(), key=lambda x:x.name):
|
||||
s.append('')
|
||||
s.append(f.dump(self.name))
|
||||
if self.classes:
|
||||
s.append('')
|
||||
s.append('## Classes')
|
||||
for c in sorted(self.classes.values(), key=lambda x:x.name):
|
||||
|
Loading…
Reference in New Issue
Block a user