py3.12/refac: AfterValidator -> StringConstraints
This commit is contained in:
parent
ddde3bd024
commit
a585d97f9f
1 changed files with 2 additions and 2 deletions
|
@ -9,11 +9,11 @@ from functools import total_ordering
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from typing import Annotated, Self
|
from typing import Annotated, Self
|
||||||
|
|
||||||
from pydantic import AfterValidator, BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict, StringConstraints
|
||||||
from vobject.base import Component
|
from vobject.base import Component
|
||||||
|
|
||||||
_logger = getLogger(__name__)
|
_logger = getLogger(__name__)
|
||||||
StrippedStr = Annotated[str, AfterValidator(lambda s: s.strip())]
|
type StrippedStr = Annotated[str, StringConstraints(strip_whitespace=True)]
|
||||||
|
|
||||||
|
|
||||||
@total_ordering
|
@total_ordering
|
||||||
|
|
Loading…
Reference in a new issue