need AnyStr to set value on pydantic model

This commit is contained in:
Josh Burman 2021-10-27 02:14:35 +00:00
parent 9464d2a944
commit 12f4d75c50

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from typing import Dict, List
from typing import Dict, List, AnyStr
from models.target import Target
@ -9,5 +9,5 @@ class ObjectiveFunction(BaseModel):
# likely with models representing each objective function type
tif_targets: List[Target]
tcc_targets: List[Target]
objective: "minimize"
objective: AnyStr = "minimize"
weight: Dict = {'tif': 1, 'tcc': 1}