Description
pyright
is adding support for attrs
classes in static type checking through a source-level extension mechanism called dataclass transforms. This will provide support the strict-subset of attrs
class semantics implemented as standard-library dataclasses
in pyright
, and by extension pylance
and VS Code.
Relevant project issues include:
microsoft/pyright#1782 - Discussion thread for feature
microsoft/pylance-release#226 - pylance
tracking issue.
microsoft/pyright#146 - pyright
ur-issue.
microsoft/pyright#1773 - Initial PR
https://github.com/microsoft/pyright/blob/master/specs/dataclass_transforms.md - Current spec in master
Would y'all be open to a PR implemented the recommendations in the linked specification?
Perhaps there's a dialog to be had to ensure that the upcoming next-gen decorator semantics can be supported via this extension mechanism? (I don't have enough of the picture in mind to understand whether this is true.)
edit - Updating cross-refs I'd originally missed and rephrasing description. This connection had already been made!