Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created August 28, 2026 20:49
Show Gist options
  • Select an option

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

Select an option

Save mypy-play/56d18666ebb5ca73580cdc452d064c59 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
from dataclasses import dataclass
from typing_extensions import TypeAliasType
@dataclass
class A:
T1 = TypeAliasType("T1", int)
x: A.T1 = 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment