Push much looping and merging of infering type vars into ValueSet

This commit is contained in:
Peter Law committed 2020-03-22 15:29:11 +00:00
1 parent 3c7621049c
commit f68d65ed59
4 files changed
+54 -49

No files matched your search

+12
View File
@@ -437,6 +437,18 @@ class ValueSet(BaseValueSet):
s = 'Optional[%s]' % s
return s
def infer_type_vars(self, value_set, is_class_value=False):
# Circular
from jedi.inference.gradual.annotation import merge_type_var_dicts
type_var_dict = {}
for value in self._set:
merge_type_var_dicts(
type_var_dict,
value.infer_type_vars(value_set, is_class_value),
)
return type_var_dict
NO_VALUES = ValueSet([])