Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1bdbfe commit 87b52bcCopy full SHA for 87b52bc
1 file changed
test-data/unit/check-redefine2.test
@@ -216,6 +216,19 @@ class C:
216
217
reveal_type(x) # N: Revealed type is "None | builtins.int"
218
219
+[case testNewRedefineGlobalVariableNoneInit4]
220
+# flags: --allow-redefinition-new --local-partial-types
221
+x = None
222
+
223
+def f() -> None:
224
+ def nested() -> None:
225
+ global x
226
+ x = 1
227
228
+ nested()
229
230
+reveal_type(x) # N: Revealed type is "None | builtins.int"
231
232
[case testNewRedefineGlobalVariableWithUnsupportedType]
233
# flags: --allow-redefinition-new --local-partial-types
234
x = 1
0 commit comments