Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save mypy-play/590437c89692bce5b2cb75615d2945c1 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