Skip to content

Commit e32ef6c

Browse files
authored
New semantic analyzer: Enable four previously skipped tests (python#6518)
1 parent 6c20e7e commit e32ef6c

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

test-data/unit/check-final.test

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class C:
338338
-- Reassignments
339339

340340
[case testFinalReassignModuleVar]
341-
# flags: --allow-redefinition --no-new-semantic-analyzer
341+
# flags: --allow-redefinition --new-semantic-analyzer
342342
from typing import Final
343343

344344
x: Final = 1
@@ -361,12 +361,11 @@ y: Final = 2 # E: Cannot redefine an existing name as final
361361
y = 3 # E: Cannot assign to final name "y"
362362

363363
z: Final = 1
364-
z: Final = 2 # E: Name 'z' already defined on line 23 \
365-
# E: Cannot redefine an existing name as final
364+
z: Final = 2 # E: Cannot redefine an existing name as final
366365
z = 3 # E: Cannot assign to final name "z"
367366

368367
[case testFinalReassignModuleVar2]
369-
# flags: --allow-redefinition --no-new-semantic-analyzer
368+
# flags: --allow-redefinition
370369
from typing import Final
371370

372371
x: Final = 1

test-data/unit/check-inference.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ class B: pass
10471047
[builtins fixtures/for.pyi]
10481048

10491049
[case testReusingInferredForIndex2]
1050-
# flags: --allow-redefinition --no-new-semantic-analyzer
1050+
# flags: --allow-redefinition
10511051

10521052
def f() -> None:
10531053
for a in [A()]: pass
@@ -2457,7 +2457,7 @@ _ = 0
24572457
_ = '' # E: Incompatible types in assignment (expression has type "str", variable has type "int")
24582458

24592459
[case testUnusedTargetNotClass]
2460-
# flags: --allow-redefinition --no-new-semantic-analyzer
2460+
# flags: --allow-redefinition
24612461
class C:
24622462
_, _ = 0, 0
24632463
_ = ''

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy