need AnyStr to set value on pydantic model
This commit is contained in:
parent
9464d2a944
commit
12f4d75c50
@ -1,5 +1,5 @@
|
|||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from typing import Dict, List
|
from typing import Dict, List, AnyStr
|
||||||
|
|
||||||
from models.target import Target
|
from models.target import Target
|
||||||
|
|
||||||
@ -9,5 +9,5 @@ class ObjectiveFunction(BaseModel):
|
|||||||
# likely with models representing each objective function type
|
# likely with models representing each objective function type
|
||||||
tif_targets: List[Target]
|
tif_targets: List[Target]
|
||||||
tcc_targets: List[Target]
|
tcc_targets: List[Target]
|
||||||
objective: "minimize"
|
objective: AnyStr = "minimize"
|
||||||
weight: Dict = {'tif': 1, 'tcc': 1}
|
weight: Dict = {'tif': 1, 'tcc': 1}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user