Skip to content

Commit 4eb0753

Browse files
r266-techhenryiii
andauthored
docs(metadata): explain selective field validation (#1342)
* docs(metadata): explain selective field validation * docs(metadata): reword selective validation intro Assisted-by: ClaudeCode:claude-fable-5 * docs(metadata): document lazy validation --------- Co-authored-by: Henry Schreiner <[email protected]>
1 parent 77e9ed4 commit 4eb0753

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/packaging/metadata.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,9 @@ class Metadata:
825825
def from_raw(cls, data: RawMetadata, *, validate: bool = True) -> Metadata:
826826
"""Create an instance from :class:`RawMetadata`.
827827
828-
If *validate* is true, all metadata will be validated. All exceptions
829-
related to validation will be gathered and raised as an :class:`ExceptionGroup`.
828+
If *validate* is true, all metadata will be validated and all related
829+
exceptions will be gathered and raised as an :class:`ExceptionGroup`;
830+
otherwise, validation happens per attribute when it is accessed.
830831
"""
831832
ins = cls()
832833
ins._raw = data.copy() # Mutations occur due to caching enriched values.

0 commit comments

Comments
 (0)