Start using ContextWrapper for annotated classes

This commit is contained in:
Dave Halter committed 2018-10-09 09:58:19 +02:00
1 parent b14b3d1012
commit 8dca2b81e4
8 files changed
+126 -124

No files matched your search

+2 -4
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.