File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -2453,9 +2453,22 @@ T() # E: "TypeVar" not callable
24532453[builtins fixtures/tuple.pyi]
24542454[typing fixtures/typing-full.pyi]
24552455
2456- [case testListComprehensionWithUnionTypeGenerator ]
2456+ [case testListComprehensionWithTupleUnionTypeGenerator ]
24572457class A: pass
24582458class B: pass
24592459a = A()
24602460b = B()
2461- l3: list[A | B] = [x for x in [a, b]]
2461+ l3: list[A | B] = [x for x in (a, b)]
2462+ l3: list[A | B] = [x for x in [a, b]]
2463+
2464+ [case testListComprehensionWithListUnionTypeGenerator]
2465+ a = A()
2466+ b = "foo"
2467+ l3: list[A | str] = [x for x in (a, b)]
2468+ l3: list[A | str] = [x for x in [a, b]]
2469+
2470+ [case testListComprehensionWithImmutableTypeUnionTypeGenerator]
2471+ a = 3.0
2472+ b = 3
2473+ l3: list[float | int] = [x for x in (a, b)]
2474+ l3: list[float | int] = [x for x in [a, b]]
You can’t perform that action at this time.
0 commit comments