Skip to content

Instantly share code, notes, and snippets.

@AlexWaygood
Created March 2, 2026 14:57
Show Gist options
  • Select an option

  • Save AlexWaygood/b08d75e75ba626fb1f0ae9d8e662659f to your computer and use it in GitHub Desktop.

Select an option

Save AlexWaygood/b08d75e75ba626fb1f0ae9d8e662659f to your computer and use it in GitHub Desktop.
{"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"}}
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))
y = lambda foo: foo
from typing import Callable, TypeVar
T = TypeVar("T")
y: Callable[[T], T]
[project]
name = "sandbox"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = []
[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