Skip to content

Commit 72eed9e

Browse files
committed
Fix testcase
1 parent cffafa9 commit 72eed9e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test-data/unit/check-flags.test

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,33 +1119,34 @@ def h(x): # E: Function is untyped after decorator transformation
11191119

11201120
[case testDisallowAnyDecoratedUnannotatedDecoratorDeferred1]
11211121
# flags: --disallow-any-decorated
1122+
from typing import Callable
11221123

1123-
def d(f):
1124+
def d(f: Callable[[int], None]) -> Callable[[int], None]:
11241125
return f
11251126

11261127
def wrapper() -> None:
11271128
if c:
11281129
@d
1129-
def h(x): # E: Function is untyped after decorator transformation
1130+
def h(x):
11301131
pass
11311132

11321133
c = [1]
11331134
[builtins fixtures/list.pyi]
11341135

11351136
[case testDisallowAnyDecoratedUnannotatedDecoratorDeferred2]
11361137
# flags: --disallow-any-decorated
1138+
from typing import Callable
11371139

1138-
def d(f):
1140+
def d(f: Callable[[int], None]) -> Callable[[int], None]:
11391141
return f
11401142

11411143
c = 1 # no deferral - check that the previous testcase is valid
11421144

11431145
def wrapper() -> None:
11441146
if c:
11451147
@d
1146-
def h(x): # E: Function is untyped after decorator transformation
1148+
def h(x):
11471149
pass
1148-
11491150
[builtins fixtures/list.pyi]
11501151

11511152
[case testDisallowAnyDecoratedErrorIsReportedOnlyOnce]

0 commit comments

Comments
 (0)