1
0
forked from VimPlug/jedi

fixed a problem that combined __getattr__ and usages

This commit is contained in:
David Halter
2013-08-13 15:39:26 +04:30
parent 2359ccbeb1
commit a895561f1a
2 changed files with 14 additions and 0 deletions

View File

@@ -434,6 +434,10 @@ class Script(object):
for d in set(definitions):
if isinstance(d, pr.Module):
names.append(api_classes.Usage(d, d))
elif isinstance(d, er.Instance):
# Instances can be ignored, because they are being created by
# ``__getattr__``.
pass
else:
names.append(api_classes.Usage(d.names[-1], d))