Skip to content

Commit

Permalink
fix annotated type def
Browse files Browse the repository at this point in the history
  • Loading branch information
elsholz committed Dec 28, 2023
1 parent ebd67af commit c78e471
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/code/metroplanner_api/type_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Span(BaseModel):


class Label(BaseModel):
label_class: pydantic.Field(
label_class: Annotated[
pydantic.constr(
pattern=(
"centered"
Expand All @@ -77,9 +77,11 @@ class Label(BaseModel):
"|right"
)
),
alias="class",
alias_priority=2,
) = "right"
pydantic.Field(
alias="class",
alias_priority=2,
),
] = "right"
text: str
## anchor: Anchor
anchor: Union[Span, Anchor]
Expand Down

0 comments on commit c78e471

Please sign in to comment.