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
{{ message }}
Repository navigation
Update "5.4. Combining Pydantic and semver" documentation to Pydantic v2.0 #422
changed the title [-]Update "5.4. Combining Pydantic and semver" to Pydantic v2.0[/-][+]Update "5.4. Combining Pydantic and semver" documentation to Pydantic v2.0[/+]on Jul 27, 2023
fromtypingimportAnnotatedfrompydanticimportAfterValidator, PlainSerializerfromsemverimportVersionPinVersion=Annotated[
str,
AfterValidator(Version.parse),
# May omit the following if serialization isn't needed:PlainSerializer(lambdav: str(v)),
]
Activity
[-]Update "5.4. Combining Pydantic and semver" to Pydantic v2.0[/-][+]Update "5.4. Combining Pydantic and semver" documentation to Pydantic v2.0[/+]Fix python-semver#422: Update advanced topic about Pydantic v2
Merge pull request #423 from tomschr/422-doc-pydantic
jaysoffian commentedon Mar 1, 2024
This also works: