Start implemeting contexts with specialized TreeNameDefinitions to avoid gambling with the parser.
This commit is contained in:
1 parent
3654de97b0
commit
cad9ae8ab1
9 files changed
+178
-111
No files matched your search
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user