Remove dict merging where it doesn't do anything

These cases are all at the end of a single-path branch that ends
up "merging" against an empty mapping which is then returned
unchanged.
This commit is contained in:
Peter Law committed 2020-03-22 15:45:18 +00:00
1 parent f68d65ed59
commit ea33db388b
2 files changed
+9 -21

No files matched your search

+2 -5
View File
@@ -209,11 +209,8 @@ class GenericClass(ClassMixin, DefineGenericBase):
if annotation_name == 'Iterable' and not is_class_value:
given = self.get_generics()
if given:
merge_type_var_dicts(
type_var_dict,
given[0].infer_type_vars(
value_set.merge_types_of_iterate(),
),
return 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