1
0
forked from VimPlug/jedi

Start implemeting contexts with specialized TreeNameDefinitions to avoid gambling with the parser.

This commit is contained in:
Dave Halter
2016-10-20 19:36:44 +02:00
parent 3654de97b0
commit cad9ae8ab1
9 changed files with 178 additions and 111 deletions
+2 -7
View File
@@ -271,15 +271,10 @@ class CompiledName(FakeName):
def is_definition(self):
return True
@property
@underscore_memoization
def parent(self):
def infer(self):
module = self._compiled_obj.get_parent_until()
return _create_from_name(self._evaluator, module, self._compiled_obj, self.name)
@parent.setter
def parent(self, value):
pass # Just ignore this, FakeName tries to overwrite the parent attribute.
return [_create_from_name(self._evaluator, module, self._compiled_obj, self.name)]
class LazyNamesDict(object):