This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thomkeh
Recipients thomkeh
Date 2022-03-30.14:49:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648651772.62.0.141726987387.issue47166@roundup.psfhosted.org>
In-reply-to
Content
The dataclass transformation ignores attributes that are annotated as ClassVar. I think it should also ignore attributes that are annotated as TypeAlias.

Specifically, I have this usecase in mind:


class RunMode(Enum):
    release = auto()
    debug = auto()

@dataclass
class Run:
    Mode: TypeAlias = RunMode
    mode: Mode = Mode.release
History
Date User Action Args
2022-03-30 14:49:32thomkehsetrecipients: + thomkeh
2022-03-30 14:49:32thomkehsetmessageid: <1648651772.62.0.141726987387.issue47166@roundup.psfhosted.org>
2022-03-30 14:49:32thomkehlinkissue47166 messages
2022-03-30 14:49:32thomkehcreate