Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vimdoc/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ def FullName(self):
return '{}.{}'.format(self.locals['dict'], attribute)
if 'exception' in self.locals:
return 'ERROR({})'.format(self.locals['exception'] or self.LocalName())
return self.locals.get('namespace', '') + self.LocalName()
if self.locals.get('namespace', '') is None:
print("Warning: skipping None returned by -> `self.locals.get('namespace', '')` for ->", self.LocalName())
else:
return self.locals.get('namespace', '') + self.LocalName()
return self.LocalName()

def TagName(self):
Expand Down
7 changes: 5 additions & 2 deletions vimdoc/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ def GetCollection(self, typ):
# Sort by namespace, but preserve order within the same namespace. This
# lets us avoid variability in the order files are traversed without
# losing all useful order information.
collection = sorted(collection,
key=lambda x: x.locals.get('namespace', ''))
try:
collection = sorted(collection,
key=lambda x: x.locals.get('namespace', ''))
except TypeError as e:
print('Module.GetCollection failed sorting collection ->', collection)
elif typ == vimdoc.DICTIONARY:
collection = sorted(collection)
non_default_names = set(x.TagName() for x in collection
Expand Down