[New-bugs-announce] [issue47166] Dataclass transform should ignore TypeAlias variables
Thomas MK
report at bugs.python.org
Wed Mar 30 10:49:32 EDT 2022
New submission from Thomas MK <tmke at posteo.net>:
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
----------
components: Library (Lib)
messages: 416368
nosy: thomkeh
priority: normal
severity: normal
status: open
title: Dataclass transform should ignore TypeAlias variables
type: behavior
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47166>
_______________________________________
More information about the New-bugs-announce
mailing list