1
0
forked from VimPlug/jedi

Make it possible to gather annotation classes for Union and Optional

This commit is contained in:
Dave Halter
2018-11-27 01:14:15 +01:00
parent eb27c64c71
commit 5bb88ca703
4 changed files with 13 additions and 2 deletions

View File

@@ -32,6 +32,9 @@ class HelperContextMixin:
def execute_annotation(self):
return self.execute_evaluated()
def gather_annotation_classes(self):
return ContextSet([self])
def merge_types_of_iterate(self, contextualized_node=None, is_async=False):
return ContextSet.from_sets(
lazy_context.infer()
@@ -353,6 +356,9 @@ class ContextSet(BaseContextSet):
context_set |= method()
return context_set
def gather_annotation_classes(self):
return ContextSet.from_sets([c.gather_annotation_classes() for c in self._set])
def get_signatures(self):
return [sig for c in self._set for sig in c.get_signatures()]