1
0
forked from VimPlug/jedi

Push much looping and merging of infering type vars into ValueSet

This commit is contained in:
Peter Law
2020-03-18 21:44:18 +00:00
parent 3c7621049c
commit f68d65ed59
4 changed files with 54 additions and 49 deletions

View File

@@ -209,13 +209,12 @@ class GenericClass(ClassMixin, DefineGenericBase):
if annotation_name == 'Iterable' and not is_class_value:
given = self.get_generics()
if given:
for nested_annotation_value in given[0]:
merge_type_var_dicts(
type_var_dict,
nested_annotation_value.infer_type_vars(
value_set.merge_types_of_iterate(),
),
)
merge_type_var_dicts(
type_var_dict,
given[0].infer_type_vars(
value_set.merge_types_of_iterate(),
),
)
else:
# Note: we need to handle the MRO _in order_, so we need to extract
# the elements from the set first, then handle them, even if we put