mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
fixed a recursion problem with InstanceElements
This commit is contained in:
@@ -270,7 +270,10 @@ class InstanceElement(object):
|
||||
|
||||
def get_parent_until(self, *classes):
|
||||
scope = self.var.get_parent_until(*classes)
|
||||
return InstanceElement(self.instance, scope)
|
||||
if isinstance(scope, parsing.Module):
|
||||
return scope
|
||||
else:
|
||||
return InstanceElement(self.instance, scope)
|
||||
|
||||
def get_decorated_func(self):
|
||||
""" Needed because the InstanceElement should not be stripped """
|
||||
|
||||
Reference in New Issue
Block a user