1
0
forked from VimPlug/jedi

Make FunctionExecutionContext.arguments private

This commit is contained in:
Dave Halter
2019-09-02 21:24:21 +02:00
parent 73003a995b
commit bdb01c7546
3 changed files with 16 additions and 13 deletions

View File

@@ -270,8 +270,9 @@ class SuperInstance(LazyValueWrapper):
@argument_clinic('[type[, obj]], /', want_context=True)
def builtins_super(types, objects, context):
if isinstance(context, FunctionExecutionContext):
if isinstance(context.arguments, InstanceArguments):
instance = context.arguments.instance
# TODO _arguments should be private. make this different.
if isinstance(context._arguments, InstanceArguments):
instance = context._arguments.instance
# TODO if a class is given it doesn't have to be the direct super
# class, it can be an anecestor from long ago.
return ValueSet({SuperInstance(instance.inference_state, instance)})