1
0
forked from VimPlug/jedi

Start using ContextWrapper for annotated classes

This commit is contained in:
Dave Halter
2018-10-09 09:58:07 +02:00
parent b14b3d1012
commit 8dca2b81e4
8 changed files with 126 additions and 124 deletions

View File

@@ -210,10 +210,8 @@ class Sequence(BuiltinOverwrite, IterableMixin):
def get_object(self):
from jedi.evaluate.context.typing import AnnotatedSubClass
klass = compiled.builtin_from_name(self.evaluator, self.array_type)
return AnnotatedSubClass(
self.evaluator, klass.parent_context, klass.tree_node,
self._get_generics()
).execute_annotation()
# TODO is this execute annotation wrong? it returns a context set?!
return AnnotatedSubClass(klass, self._get_generics()).execute_annotation()
def py__bool__(self):
return None # We don't know the length, because of appends.