Skip to content

Commit 6c16e3d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5998612 commit 6c16e3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypy/nested-class-scope.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
x: Optional[int] = None
44
y: Optional[int] = None
55

6+
67
def f() -> None:
78
x = 1
89
y = 1
10+
911
class C:
1012
reveal_type(x) # Incorrectly reveals int, should be Optional[int]
1113
reveal_type(y) # Correctly reveals int
12-
x = 2
14+
x = 2

0 commit comments

Comments
 (0)