mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-02-24 09:56:20 +00:00
fix: pydantic extra keywords deprecated (#753)
Pydantic deprecates using extra keyword arguments on Field. Used json_schema_extra instead. Deprecated in Pydantic V2.0 to be removed in V3.0. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -22,13 +22,17 @@ class LoadImportCommonSettings(SettingsBaseModel):
|
||||
|
||||
import_file_path: Optional[Union[str, Path]] = Field(
|
||||
default=None,
|
||||
description="Path to the file to import load data from.",
|
||||
examples=[None, "/path/to/yearly_load.json"],
|
||||
json_schema_extra={
|
||||
"description": "Path to the file to import load data from.",
|
||||
"examples": [None, "/path/to/yearly_load.json"],
|
||||
},
|
||||
)
|
||||
import_json: Optional[str] = Field(
|
||||
default=None,
|
||||
description="JSON string, dictionary of load forecast value lists.",
|
||||
examples=['{"load0_mean": [676.71, 876.19, 527.13]}'],
|
||||
json_schema_extra={
|
||||
"description": "JSON string, dictionary of load forecast value lists.",
|
||||
"examples": ['{"load0_mean": [676.71, 876.19, 527.13]}'],
|
||||
},
|
||||
)
|
||||
|
||||
# Validators
|
||||
|
||||
Reference in New Issue
Block a user