Skip to content

Commit 404d839

Browse files
committed
Refactor: replace make_simplified_union with UnionType.make_union in semanal_shared.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 34930f8 commit 404d839

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/semanal_shared.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
TypeVarTupleType,
4848
UnpackType,
4949
get_proper_type,
50+
UnionType,
5051
)
5152

5253
# Subclasses can override these Var attributes with incompatible types. This can also be
@@ -305,7 +306,7 @@ def calculate_tuple_fallback(typ: TupleType) -> None:
305306
raise NotImplementedError
306307
else:
307308
items.append(item)
308-
fallback.args = (make_simplified_union(items),)
309+
fallback.args = (UnionType.make_union(items),)
309310

310311

311312
class _NamedTypeCallback(Protocol):

0 commit comments

Comments
 (0)