This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"version": 1, "file_mapping": {"pkg-__init__.py": "pkg/__init__.py", "pkg-mod.py": "pkg/mod.py", "pkg-mod.pyi": "pkg/mod.pyi", "pyproject.toml": "pyproject.toml"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Callable, TypeVar, reveal_type | |
| from .mod import y | |
| T = TypeVar("T") | |
| x: Callable[[T], T] = lambda obj: obj | |
| def test(z: Callable[[T], T]): | |
| reveal_type(x(42)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Callable, TypeVar, reveal_type | |
| from .mod import y | |
| T = TypeVar("T") | |
| x: Callable[[T], T] = lambda obj: obj | |
| def test(z: Callable[[T], T]): | |
| reveal_type(x(42)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"dependencies": []} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"dependencies": []} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"dependencies": []} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"dependencies": ["requests", "types-requests"]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from types import GenericAlias | |
| from typing import Any, Callable, Concatenate, overload | |
| class partial[**P1, **P2, T, R, *Ts]: | |
| @overload | |
| def __new__(cls, func: Callable[P1, R], /) -> partial[P1, P1, Any, R]: ... | |
| @overload | |
| def __new__(cls, func: Callable[Concatenate[*Ts, P2], R], /, *args: *Ts) -> partial[Concatenate[*Ts, P2], P2, Any, R, *Ts]: ... | |
| @overload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| f'None{name_5!s}' if (name_5 if name_2 else name_2)({*()}, (name_4 := name_0)) else name_4 % name_5 if f'' else name_4 & name_5 | |
| {{*()}: {name_4.name_1 for name_1 in name_2 if name_0 if name_2 if name_3 if name_0 for name_0 in name_4 if name_4 if name_3 for name_0 in name_1 if name_5 for name_4 in name_5 if name_1 if name_4 if name_4 if name_2 if name_1 for name_0 in name_2 if name_4 if name_5 if name_2 if name_2} for name_1, in (lambda: name_5) if {name_0: name_1 for name_0 in name_2 for name_4 in name_1 for name_0 in name_3} for name_0[name_2] in name_0 and name_3 and name_4 and name_5 if name_3(name_4, name_4, name_0=name_3) for [name_2, name_0] in (name_4 async for name_4 in name_5 async for name_0 in name_1 async for name_1 in name_3 async for name_5 in name_2) if {name_3 for name_5 in name_4 for name_2 in name_4 for name_4 in name_3 for name_4 in name_0} if {*()} if {name_2 for name_5 in name_1 for name_0 in name_3 for name_1 in name_2 for name_1 in name_3 for name_5 in name_4 for name_4 in name_2} if na |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> class Foo: | |
| ... def __call__(self): | |
| ... return 42 | |
| ... | |
| >>> class Bar: | |
| ... __call__ = Foo() | |
| ... | |
| >>> class Baz: | |
| ... __call__ = Bar() | |
| ... |