Skip to content

Commit d8a6f94

Browse files
use comprehension instead of map
1 parent 822dd30 commit d8a6f94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/typeops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def make_simplified_union(
603603
simplified_set = try_contracting_literals_in_union(simplified_set)
604604

605605
# Step 5: Combine Literals and Instances with LKVs, e.g. Literal[1]?, Literal[1] -> Literal[1]?
606-
proper_items: list[ProperType] = list(map(get_proper_type, simplified_set))
606+
proper_items: list[ProperType] = [get_proper_type(t) for t in simplified_set]
607607
last_known_values: list[LiteralType | None] = [
608608
p_t.last_known_value if isinstance(p_t, Instance) else None for p_t in proper_items
609609
]

0 commit comments

Comments
 (0)