1
0
forked from VimPlug/jedi

minor changes to the NamePart representation

This commit is contained in:
Dave Halter
2014-02-13 19:53:41 +01:00
parent 600371632f
commit bb4d77f2a8

View File

@@ -759,7 +759,7 @@ class Import(Simple):
return [self.alias]
if len(self.namespace) > 1:
o = self.namespace
n = Name(self._sub_module, [(o.names[0], o.start_pos)],
n = Name(self._sub_module, [(o.names[0].string, o.start_pos)],
o.start_pos, o.end_pos, parent=o.parent)
return [n]
else:
@@ -1397,9 +1397,6 @@ class NamePart(object):
__slots__ = ('parent', 'string', '_line', '_column')
def __init__(self, string, parent, start_pos):
if isinstance(string, NamePart):
# may happen, because this class used to be a `str`.
string = string.string
self.string = string
self.parent = parent
self._line = start_pos[0]