Skip to content

Commit dc6d63d

Browse files
use comprehension instead of map
1 parent 41a4d77 commit dc6d63d

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
@@ -611,7 +611,7 @@ def make_simplified_union(
611611
simplified_set = try_contracting_literals_in_union(simplified_set)
612612

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

0 commit comments

Comments
 (0)