forked from VimPlug/jedi
Small improvements to generator/async completions
This commit is contained in:
@@ -340,10 +340,10 @@ class BaseFunctionExecutionContext(ValueContext, TreeContextMixin):
|
||||
for c in async_generator_classes
|
||||
).execute_annotation(None)
|
||||
else:
|
||||
async_classes = inference_state.typing_module.py__getattribute__('Coroutine')
|
||||
async_classes = inference_state.types_module.py__getattribute__('CoroutineType')
|
||||
return_values = self.get_return_values()
|
||||
# Only the first generic is relevant.
|
||||
generics = (return_values.py__class__(), NO_VALUES, NO_VALUES)
|
||||
generics = (NO_VALUES, NO_VALUES, return_values.py__class__())
|
||||
return ValueSet(
|
||||
GenericClass(c, TupleGenericManager(generics)) for c in async_classes
|
||||
).execute_annotation(None)
|
||||
|
||||
Reference in New Issue
Block a user