We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c924be1 commit 71ebd60Copy full SHA for 71ebd60
1 file changed
src/pals/kinds/Lattice.py
@@ -1,7 +1,8 @@
1
-from pydantic import model_validator, Field
2
-from typing import Annotated, List, Literal, Union
+from pydantic import model_validator
+from typing import List, Literal, Union
3
4
from .BeamLine import BeamLine
5
+from .PlaceholderName import PlaceholderName
6
from .mixin import BaseElement
7
from ..functions import load_file_to_dict, store_dict_to_file
8
@@ -11,7 +12,7 @@ class Lattice(BaseElement):
11
12
13
kind: Literal["Lattice"] = "Lattice"
14
- branches: List[Annotated[Union[BeamLine], Field(discriminator="kind")]]
15
+ branches: List[Union[BeamLine, PlaceholderName]]
16
17
@model_validator(mode="before")
18
@classmethod
0 commit comments