Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf165eac

Browse files
Otto-AAViicos
andauthored
Update documentation about@dataclass_transform support (#11860)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
1 parent53f460c commitf165eac

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

‎docs/integrations/visual_studio_code.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,7 @@ This is a limitation of dataclass transforms and cannot be fixed in pydantic.
283283

284284
These details are only useful for other library authors, etc.
285285

286-
This additional editor support works by implementing the proposed draft standard for[Dataclass Transform (PEP 681)](https://peps.python.org/pep-0681/).
286+
This additional editor support works by making use of the[`@dataclass_transform` decorator](https://typing.python.org/en/latest/spec/dataclasses.html#the-dataclass-transform-decorator)
287+
(introduced by[PEP 681](https://peps.python.org/pep-0681/)).
287288

288-
The proposed draft standard is written by Eric Traut, from the Microsoft team, the same author of the open source package Pyright (used by Pylance to provide Python support in VS Code).
289-
290-
The intention of the standard is to provide a way for libraries like Pydantic and others to tell editors and tools that they (the editors) should treat these libraries (e.g. Pydantic) as if they were`dataclasses`, providing autocompletion, type checks, etc.
291-
292-
The draft standard also includes an[Alternate Form](https://github.com/microsoft/pyright/blob/master/specs/dataclass_transforms.md#alternate-form) for early adopters, like Pydantic, to add support for it right away, even before the new draft standard is finished and approved.
293-
294-
This new draft standard, with the Alternate Form, is already supported by Pyright, so it can be used via Pylance in VS Code.
295-
296-
As it is being proposed as an official standard for Python, other editors can also easily add support for it.
297-
298-
And authors of other libraries similar to Pydantic can also easily adopt the standard right away (using the "Alternate Form") and get the benefits of these additional editor features.
289+
The standard provides a way for libraries like Pydantic and others to tell editors and tools that they (the editors) should treat these libraries (e.g. Pydantic) as if they were[dataclasses][dataclasses], providing autocompletion, type checks, etc.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp