Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created January 24, 2026 09:14
Show Gist options
  • Select an option

  • Save mypy-play/11cabf4942f89eb67b0bc2483e4fb78c to your computer and use it in GitHub Desktop.

Select an option

Save mypy-play/11cabf4942f89eb67b0bc2483e4fb78c to your computer and use it in GitHub Desktop.
Shared via mypy Playground
from typing import Callable
class C[T]: ...
def f[U]() -> type[C[U]]:
return C
c: Callable[[], C[int]] = f()
reveal_type(f)
reveal_type(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment