-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
The implementation needs some work with regards to string annotations. This only affects ClassVar
and InitVar
, since other annotations are ignored.
@dataclass
class C:
context: "InitVar[context]"
count: "ClassVar[Counter]"
This is all the more important with regards to PEP 563, "Postponed Evaluation of Annotations".
I'd like to keep the property that typing isn't imported by dataclasses.py, so maybe I'll resort to inspecting the string. I'll probably wait until PEP 563 is finalized before doing anything about this.
Metadata
Metadata
Assignees
Labels
No labels