Skip to content

Commit 0683c5c

Browse files
dbochkov-flexcomputemomchil-flex
authored andcommitted
eliminate unnecessary errors due to pydantic field initialization
1 parent c401d29 commit 0683c5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tidy3d/web/api/container.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from ..core.task_info import TaskInfo, RunInfo
1515
from ..core.constants import TaskId, TaskName
1616
from ...components.base import Tidy3dBaseModel
17+
from ...components.types import annotate_type
1718
from ...log import log, get_logging_console
1819

1920
from ...exceptions import DataError
@@ -418,7 +419,7 @@ class Batch(WebContainer):
418419
* `Inverse taper edge coupler <../../notebooks/EdgeCoupler.html>`_
419420
"""
420421

421-
simulations: Dict[TaskName, SimulationType] = pd.Field(
422+
simulations: Dict[TaskName, annotate_type(SimulationType)] = pd.Field(
422423
...,
423424
title="Simulations",
424425
description="Mapping of task names to Simulations to run as a batch.",

0 commit comments

Comments
 (0)