Created
March 2, 2026 14:47
-
-
Save AlexWaygood/c7d9b9373fdc084d17ae6c8965df6e85 to your computer and use it in GitHub Desktop.
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)) | |
| from .mod import y | |
| reveal_type(y(42)) | |
| reveal_type(z(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
| y = lambda foo: foo |
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 | |
| T = TypeVar("T") | |
| y: Callable[[T], T] |
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
| [project] | |
| name = "sandbox" | |
| version = "0.1.0" | |
| requires-python = ">=3.10" | |
| dependencies = ["pycroscope"] | |
| [tool.ty] | |
| [tool.ty.terminal] | |
| output-format = "concise" | |
| [tool.ty.rules] | |
| undefined-reveal = "ignore" | |
| [tool.pyright] | |
| reportWildcardImportFromLibrary = false | |
| reportSelfClsParameterName = false | |
| reportUnusedExpression = false | |
| [tool.zuban] | |
| pretty = false | |
| check_untyped_defs = true | |
| [tool.mypy] | |
| color_output = true | |
| pretty = false | |
| check_untyped_defs = true | |
| [tool.pyrefly] | |
| output-format = "concise" | |
| [tool.pycroscope] | |
| import_paths = ["."] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment