You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/types.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,9 @@ class PngHeader:
81
81
## Overview of type checkers
82
82
83
83
Types -- regardless how added -- are *only metadata* that can be queried from the class and they aren't used for anything out of the box.
84
-
So, in practice, types show their biggest usefulness in combination with type-checking tools or IDE support.
84
+
Some packages like [*cattrs*](https://catt.rs/) or Pydantic use this metadata for runtime type validation and (de-)serialization.
85
+
86
+
But their original purpose is to support static type-checking tools and IDEs.
85
87
86
88
Over the years, the type-checking community has come up with {pep}`681` that defines `dataclass_transform` to offer a baseline way to define dataclass-like class generators.
87
89
All modern type-checking implementations support that, but in practice it's not enough to make the most out of *attrs*, so some offer further *attrs*-specific support.
0 commit comments