diff --git a/jedi/parser/python/tree.py b/jedi/parser/python/tree.py index b87d4bfe..5ca944a2 100644 --- a/jedi/parser/python/tree.py +++ b/jedi/parser/python/tree.py @@ -101,7 +101,7 @@ class PythonMixin(object): def get_name_of_position(self, position): for c in self.children: if isinstance(c, Leaf): - if isinstance(c, Name) and c.start_pos <= position <= c.end_pos: + if c.type == 'name' and c.start_pos <= position <= c.end_pos: return c else: result = c.get_name_of_position(position)