top | item 28300033

(no title)

tiangolo | 4 years ago

Yep it uses the in-progress draft-spec dataclass_transforms https://github.com/microsoft/pyright/blob/main/specs/datacla...

As Pyright already supports it, and Pylance is built on Pyright, they can use it directly. Hopefully more editors will use it and hopefully it will be part of the standard Python (in a PEP, with typing.dataclass_transform, and with mypy support).

And just in case you're wondering, there's no downside to having the dataclass_transform, anything that doesn't support it is unaffected, and nothing else would have completion either way.

discuss

order

No comments yet.