Skip to content

Instantly share code, notes, and snippets.

@AlexWaygood
Created March 10, 2026 10:41
Show Gist options
  • Select an option

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

Select an option

Save AlexWaygood/449ffea58a83575ec10f0fb7efb221c2 to your computer and use it in GitHub Desktop.
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
from typing import Concatenate, Callable
def foo[**P, T](fn: Callable[P, None], x: T, *args: P.args, **kwargs: P.kwargs) -> T:
raise NotImplementedError
def test(a: str) -> None: ...
reveal_type(foo)
reveal_type(foo(fn=test, x=1, a=""))
[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.mypy]
color_output = true
pretty = true
check_untyped_defs = true
[tool.pyright]
reportWildcardImportFromLibrary = false
reportSelfClsParameterName = false
reportUnusedExpression = false
[tool.zuban]
pretty = true
check_untyped_defs = true
[tool.pycroscope]
import_paths = ["."]
[tool.pyrefly]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment