Open KotlinIsland opened 2 months ago
from typing import Annotated from pydantic import BaseModel, BeforeValidator, Field class A(BaseModel): a: Annotated[int, BeforeValidator(lambda x: x + 1)] = Field(None) # cannot specify `Annotated` and value `Field`s together for 'a' print(A(a=1))
Maybe this was true for Pydantic 1 or something?
Maybe this was true for Pydantic 1 or something?