Skip to content

Commit 34930f8

Browse files
committed
Refactor: replace make_simplified_union with UnionType.make_union in plugins/enums.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 4cb17eb commit 34930f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/plugins/enums.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
LiteralType,
2828
ProperType,
2929
Type,
30+
UnionType,
3031
get_proper_type,
3132
is_named_instance,
3233
)
@@ -235,7 +236,7 @@ class SomeEnum:
235236
for proper_type in proper_types
236237
)
237238
if all_equivalent_types:
238-
return make_simplified_union(cast(Sequence[Type], proper_types))
239+
return UnionType.make_union(cast(Sequence[Type], proper_types))
239240
return ctx.default_attr_type
240241

241242
assert isinstance(ctx.type, Instance)

0 commit comments

Comments
 (0)