File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1463,28 +1463,27 @@ _testNoCrashOnGenericUnionUnpacking.py:16: error: Revealed type is 'Union[builti
1463
1463
from enum import Enum
1464
1464
class E(Enum):
1465
1465
A = 'a'
1466
- l = [e for e in E]
1467
- reveal_type(l[0])
1466
+ (reveal_type(e) for e in E)
1468
1467
for e in E:
1469
1468
reveal_type(e)
1470
1469
[out]
1471
- _testEnumIteration.py:5 : error: Revealed type is '_testEnumIteration.E*'
1472
- _testEnumIteration.py:7 : error: Revealed type is '_testEnumIteration.E*'
1470
+ _testEnumIteration.py:4 : error: Revealed type is '_testEnumIteration.E*'
1471
+ _testEnumIteration.py:6 : error: Revealed type is '_testEnumIteration.E*'
1473
1472
1474
1473
[case testEnumIterable]
1475
1474
from enum import Enum
1476
1475
from typing import Iterable
1477
1476
class E(Enum):
1478
- a = 'a'
1479
- def f(ie:Iterable[E]):
1477
+ A = 'a'
1478
+ def f(ie: Iterable[E]):
1480
1479
pass
1481
1480
f(E)
1482
1481
1483
1482
[case testIntEnumIterable]
1484
1483
from enum import IntEnum
1485
1484
from typing import Iterable
1486
1485
class N(IntEnum):
1487
- x = 1
1486
+ X = 1
1488
1487
def f(ni: Iterable[N]):
1489
1488
pass
1490
1489
def g(ii: Iterable[int]):
@@ -1496,7 +1495,7 @@ g(N)
1496
1495
from enum import Enum
1497
1496
from typing import Iterable
1498
1497
class E(str, Enum):
1499
- a = 'foo'
1498
+ A = 'foo'
1500
1499
def f(ei: Iterable[E]):
1501
1500
pass
1502
1501
def g(si: Iterable[str]):
You can’t perform that action at this time.
0 commit comments