Skip to content

Commit 5998612

Browse files
committed
modification de semanal.py
1 parent 2b1bba2 commit 5998612

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mypy/nested-class-scope.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from typing import *
2+
3+
x: Optional[int] = None
4+
y: Optional[int] = None
5+
6+
def f() -> None:
7+
x = 1
8+
y = 1
9+
class C:
10+
reveal_type(x) # Incorrectly reveals int, should be Optional[int]
11+
reveal_type(y) # Correctly reveals int
12+
x = 2

0 commit comments

Comments
 (0)