Skip to content

Commit 4ad5492

Browse files
committed
Refactor: replace make_simplified_union with UnionType.make_union in erasetype.py (#8624)
This commit replaces all calls to make_simplified_union with UnionType.make_union in this file, as part of the codebase modernization effort in issue #8624.
1 parent ec2f254 commit 4ad5492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/erasetype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def visit_union_type(self, t: UnionType) -> ProperType:
131131
erased_items = [erase_type(item) for item in t.items]
132132
from mypy.typeops import make_simplified_union
133133

134-
return make_simplified_union(erased_items)
134+
return UnionType.make_union(erased_items)
135135

136136
def visit_type_type(self, t: TypeType) -> ProperType:
137137
return TypeType.make_normalized(t.item.accept(self), line=t.line)
@@ -271,7 +271,7 @@ def visit_union_type(self, t: UnionType) -> Type:
271271
else:
272272
from mypy.typeops import make_simplified_union
273273

274-
merged.append(make_simplified_union(types))
274+
merged.append(UnionType.make_union(types))
275275
del instances_by_name[item.type.fullname]
276276
else:
277277
merged.append(orig_item)

0 commit comments

Comments
 (0)