Skip to content

Commit 6720ffe

Browse files
use comprehension instead of map
1 parent 83e7789 commit 6720ffe

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
@@ -602,7 +602,7 @@ def make_simplified_union(
602602
simplified_set = try_contracting_literals_in_union(simplified_set)
603603

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

0 commit comments

Comments
 (0)