File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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
11261127def 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
11321133c = [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
11411143c = 1 # no deferral - check that the previous testcase is valid
11421144
11431145def 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]
You can’t perform that action at this time.
0 commit comments