Skip to content

Commit d1d99a7

Browse files
committed
Update comment
1 parent 1d95ec0 commit d1d99a7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

mypy/checker.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4536,8 +4536,13 @@ class Color(Enum):
45364536
BLUE = 2
45374537
YELLOW = 3
45384538
4539-
...and if we call `try_expanding_enum_to_union(color_instance, 'module.Color')`,
4540-
this function will return Literal[Color.RED, Color.BLUE, Color.YELLOW].
4539+
class Status(Enum):
4540+
SUCCESS = 1
4541+
FAILURE = 2
4542+
UNKNOWN = 3
4543+
4544+
...and if we call `try_expanding_enum_to_union(Union[Color, Status], 'module.Color')`,
4545+
this function will return Literal[Color.RED, Color.BLUE, Color.YELLOW, Status].
45414546
"""
45424547
if isinstance(typ, UnionType):
45434548
new_items = [try_expanding_enum_to_union(item, target_fullname)

0 commit comments

Comments
 (0)