forked from VimPlug/jedi
Use AnnotatedSubClass for Async classes like everywhere else as stubs
This commit is contained in:
@@ -327,7 +327,7 @@ class FunctionExecutionContext(TreeContext):
|
||||
# The contravariant doesn't seem to be defined.
|
||||
generics = (yield_contexts.py__class__(), NO_CONTEXTS)
|
||||
return ContextSet(
|
||||
AnnotatedSubClass(c, generics) for c in async_generator_classes
|
||||
AnnotatedSubClass(c.stub_context, generics) for c in async_generator_classes
|
||||
).execute_annotation()
|
||||
else:
|
||||
if evaluator.environment.version_info < (3, 5):
|
||||
@@ -337,7 +337,7 @@ class FunctionExecutionContext(TreeContext):
|
||||
# Only the first generic is relevant.
|
||||
generics = (return_contexts.py__class__(), NO_CONTEXTS, NO_CONTEXTS)
|
||||
return ContextSet(
|
||||
AnnotatedSubClass(c, generics) for c in async_classes
|
||||
AnnotatedSubClass(c.stub_context, generics) for c in async_classes
|
||||
).execute_annotation()
|
||||
else:
|
||||
if is_generator:
|
||||
|
||||
Reference in New Issue
Block a user