Make it possible to gather annotation classes for Union and Optional

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

No files matched your search

+5
View File
@@ -180,6 +180,11 @@ class TypingContextWithIndex(_WithIndexBase):
self._context_of_index
)])
def gather_annotation_classes(self):
return ContextSet.from_sets(
_iter_over_arguments(self._index_context, self._context_of_index)
)
class TypingContext(_BaseTypingContext):
index_class = TypingContextWithIndex