Created
March 1, 2026 12:14
-
-
Save AlexWaygood/a1739f1cca18857e3cec946d00ef1449 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