mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-03 02:33:23 +08:00
Fake context python code is now not the base for a lot of things anymore. It just gets executed.
This commit is contained in:
@@ -253,7 +253,8 @@ class CompiledInstanceName(compiled.CompiledName):
|
||||
@iterator_to_context_set
|
||||
def infer(self):
|
||||
for result_context in super(CompiledInstanceName, self).infer():
|
||||
if isinstance(result_context, FunctionContext):
|
||||
is_function = result_context.api_type == 'function'
|
||||
if result_context.tree_node is not None and is_function:
|
||||
parent_context = result_context.parent_context
|
||||
while parent_context.is_class():
|
||||
parent_context = parent_context.parent_context
|
||||
@@ -263,7 +264,7 @@ class CompiledInstanceName(compiled.CompiledName):
|
||||
parent_context, result_context.tree_node
|
||||
)
|
||||
else:
|
||||
if result_context.api_type == 'function':
|
||||
if is_function:
|
||||
yield CompiledBoundMethod(result_context)
|
||||
else:
|
||||
yield result_context
|
||||
|
||||
Reference in New Issue
Block a user