The datatree decorator now utilizes typing.dataclass_transform. This allows static analysis tools to correctly recognize it as a dataclass-like decorator, enabling proper inference of the generated __init__ method.
Pylance still does not recognize datatrees Node fields (field injection) and calling Nodes (field binding) yet.
submitted by /u/GianniMariani to r/Python
[link] [comments]
Laisser un commentaire