Skip to content

Commit b5218d6

Browse files
committed
Refactor: replace make_simplified_union with UnionType.make_union in typeops.py (#8624)
This commit replaces all calls to make_simplified_union with UnionType.make_union in typeops.py, as part of the codebase modernization and consistency improvements proposed in issue #8624.
1 parent 404d839 commit b5218d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/typeops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,14 +846,14 @@ def erase_def_to_union_or_bound(tdef: TypeVarLikeType) -> Type:
846846
if isinstance(tdef, ParamSpecType):
847847
return AnyType(TypeOfAny.from_error)
848848
if isinstance(tdef, TypeVarType) and tdef.values:
849-
return make_simplified_union(tdef.values)
849+
return UnionType.make_union(tdef.values)
850850
else:
851851
return tdef.upper_bound
852852

853853

854854
def erase_to_union_or_bound(typ: TypeVarType) -> ProperType:
855855
if typ.values:
856-
return make_simplified_union(typ.values)
856+
return UnionType.make_union(typ.values)
857857
else:
858858
return get_proper_type(typ.upper_bound)
859859

0 commit comments

Comments
 (0)