Skip to content

Commit

Permalink
Fix generator comprehension in meet.py (python#17969)
Browse files Browse the repository at this point in the history
Since mypyc will treat these as list comprehensions
  • Loading branch information
hauntsaninja authored Oct 16, 2024
1 parent eb816b0 commit 10f3ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypy/meet.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def is_enum_overlapping_union(x: ProperType, y: ProperType) -> bool:
and x.type.is_enum
and isinstance(y, UnionType)
and any(
isinstance(p, LiteralType) and x.type == p.fallback.type
for p in (get_proper_type(z) for z in y.relevant_items())
isinstance(p := get_proper_type(z), LiteralType) and x.type == p.fallback.type
for z in y.relevant_items()
)
)

Expand Down

0 comments on commit 10f3ce5

Please sign in to comment.