generated from ydataai/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: missing migrations for pydantic v2 (#155)
* fix: missing migrations for pydantic v2 * fix(linting): code formatting --------- Co-authored-by: Azory YData Bot <[email protected]>
- Loading branch information
1 parent
c6c7277
commit 91616da
Showing
3 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
from typing import Generic, Optional, TypeVar | ||
|
||
from pydantic import Field | ||
from pydantic import ConfigDict, Field | ||
|
||
from .model import BaseModel | ||
|
||
T = TypeVar("T") | ||
|
||
|
||
class GenericStateErrorStatus(BaseModel, Generic[T]): | ||
model_config = ConfigDict( | ||
use_enum_values=True | ||
) | ||
state: Optional[T] = Field(None) | ||
|
||
class Config: | ||
use_enum_values = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters