Skip to content

Commit 71ebd60

Browse files
authored
Lattice w/ PlaceHolder Name (#62)
1 parent c924be1 commit 71ebd60

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/pals/kinds/Lattice.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from pydantic import model_validator, Field
2-
from typing import Annotated, List, Literal, Union
1+
from pydantic import model_validator
2+
from typing import List, Literal, Union
33

44
from .BeamLine import BeamLine
5+
from .PlaceholderName import PlaceholderName
56
from .mixin import BaseElement
67
from ..functions import load_file_to_dict, store_dict_to_file
78

@@ -11,7 +12,7 @@ class Lattice(BaseElement):
1112

1213
kind: Literal["Lattice"] = "Lattice"
1314

14-
branches: List[Annotated[Union[BeamLine], Field(discriminator="kind")]]
15+
branches: List[Union[BeamLine, PlaceholderName]]
1516

1617
@model_validator(mode="before")
1718
@classmethod

0 commit comments

Comments
 (0)