Skip to content

Commit cdc64c0

Browse files
committed
Refactor: replace make_simplified_union with UnionType.make_union in suggestions.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 b5218d6 commit cdc64c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/suggestions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def generate_type_combinations(types: list[Type]) -> list[Type]:
924924
and unioning the types. We try both.
925925
"""
926926
joined_type = join_type_list(types)
927-
union_type = make_simplified_union(types)
927+
union_type = UnionType.make_union(types)
928928
if joined_type == union_type:
929929
return [joined_type]
930930
else:
@@ -1018,7 +1018,7 @@ def refine_union(t: UnionType, s: ProperType) -> Type:
10181018
# Turn strict optional on when simplifying the union since we
10191019
# don't want to drop Nones.
10201020
with state.strict_optional_set(True):
1021-
return make_simplified_union(new_items)
1021+
return UnionType.make_union(new_items)
10221022

10231023

10241024
def refine_callable(t: CallableType, s: CallableType) -> CallableType:

0 commit comments

Comments
 (0)