1
0
forked from VimPlug/jedi

NamePart is now no str subclass anymore. They are separated, which makes us save a lot of dicts

This commit is contained in:
Dave Halter
2014-02-13 19:22:36 +01:00
parent 660a29ef93
commit 600371632f
7 changed files with 34 additions and 18 deletions

View File

@@ -44,14 +44,14 @@ class LazyName(helpers.FakeName):
else:
try:
o = obj.__objclass__
parser_path.append(pr.NamePart(obj.__name__, None, None))
parser_path.append(pr.NamePart(obj.__name__, None, (None, None)))
obj = o
except AttributeError:
pass
try:
module_name = obj.__module__
parser_path.insert(0, pr.NamePart(obj.__name__, None, None))
parser_path.insert(0, pr.NamePart(obj.__name__, None, (None, None)))
except AttributeError:
# Unfortunately in some cases like `int` there's no __module__
module = builtins