Ignore super calls when super class cannot be inferred
This commit is contained in:
1 parent
ed092e6da7
commit
a3afdc0ece
2 files changed
+17
No files matched your search
@@ -243,6 +243,9 @@ def builtins_super(types, objects, context):
|
||||
if isinstance(context, FunctionExecutionContext):
|
||||
if isinstance(context.var_args, InstanceArguments):
|
||||
su = context.var_args.instance.py__class__().py__bases__()
|
||||
# If super class cannot be infered
|
||||
if len(su) == 0:
|
||||
return NO_CONTEXTS
|
||||
return su[0].infer().execute_evaluated()
|
||||
|
||||
return NO_CONTEXTS
|
||||
|
||||
Reference in new issue
Block a user