Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Update tests
  • Loading branch information
JukkaL committed Apr 22, 2026
commit d4f6a85a7c2046ab6963dbda466d8d513dae2d18
8 changes: 4 additions & 4 deletions test-data/unit/check-redefine2.test
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def f() -> None:
reveal_type(x) # N: Revealed type is "None | builtins.int"

[case testNewRedefineGlobalVariableNoneInit2]
# flags: --allow-redefinition-new --local-partial-types
# flags: --allow-redefinition
x = None

def deco(f): return f
Expand All @@ -196,7 +196,7 @@ def f() -> None:
reveal_type(x) # N: Revealed type is "None | builtins.int"

[case testNewRedefineGlobalVariableNoneInit3]
# flags: --allow-redefinition-new --local-partial-types
# flags: --allow-redefinition
from typing import overload

x = None
Expand All @@ -217,7 +217,7 @@ class C:
reveal_type(x) # N: Revealed type is "None | builtins.int"

[case testNewRedefineGlobalVariableNoneInit4]
# flags: --allow-redefinition-new --local-partial-types
# flags: --allow-redefinition
x = None

def f() -> None:
Expand All @@ -230,7 +230,7 @@ def f() -> None:
reveal_type(x) # N: Revealed type is "None | builtins.int"

[case testNewRedefineGlobalVariableWithUnsupportedType]
# flags: --allow-redefinition-new --local-partial-types
# flags: --allow-redefinition
x = 1

def f() -> None:
Expand Down
6 changes: 3 additions & 3 deletions test-data/unit/fine-grained.test
Original file line number Diff line number Diff line change
Expand Up @@ -11688,7 +11688,7 @@ import m
reveal_type(m.x)

[file m.py]
# mypy: allow-redefinition-new
# mypy: allow-redefinition
import m2

x = None
Expand All @@ -11713,7 +11713,7 @@ import m
reveal_type(m.x)

[file m.py]
# mypy: allow-redefinition-new
# mypy: allow-redefinition
import m2

x = None
Expand Down Expand Up @@ -11742,7 +11742,7 @@ import m
reveal_type(m.x)

[file m.py]
# mypy: allow-redefinition-new
# mypy: allow-redefinition
import m2

x = None
Expand Down