8000
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 331f845 commit d1778daCopy full SHA for d1778da
test-data/unit/check-modules.test
@@ -1280,15 +1280,21 @@ import a
1280
[file a.py]
1281
import b
1282
def g() -> None:
1283
- f()
+ f('')
1284
@b.deco
1285
-def f() -> int: pass
+def f(a: str) -> int: pass
1286
+reveal_type(f)
1287
x = 1 + 1
1288
[file b.py]
-from typing import Any
1289
+from typing import Callable, TypeVar
1290
import a
-def deco(f: Any) -> Any:
1291
+T = TypeVar('T')
1292
+def deco(f: Callable[[T], int]) -> Callable[[T], int]:
1293
a.x
1294
+ return f
1295
+[out]
1296
+main:1: note: In module imported here:
1297
+tmp/a.py:6: error: Revealed type is 'def (builtins.str*) -> builtins.int'
1298
1299
1300
-- Scripts and __main__
0 commit comments