From b5d2129029336855c0c11a31a4fa4568097c85c7 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Tue, 15 Oct 2024 23:21:03 -0700 Subject: [PATCH] Fix generator comprehension in meet.py Since mypyc will treat these as list comprehensions --- mypy/meet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy/meet.py b/mypy/meet.py index 9f5c2d72a8cb..d614ecc45a57 100644 --- a/mypy/meet.py +++ b/mypy/meet.py @@ -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() ) )