Skip to content

Commit

Permalink
fix: change connection_sorter to source_sorter
Browse files Browse the repository at this point in the history
  • Loading branch information
mstechly committed May 21, 2024
1 parent 9e8ec79 commit e54a02a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qref/_schema_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _inner(v):


name_sorter = AfterValidator(sorter(lambda p: p.name))
connection_sorter = AfterValidator(sorter(lambda c: c.source))
source_sorter = AfterValidator(sorter(lambda c: c.source))


class _PortV1(BaseModel):
Expand Down Expand Up @@ -85,10 +85,10 @@ class RoutineV1(BaseModel):
type: Optional[str] = None
ports: Annotated[list[_PortV1], name_sorter] = Field(default_factory=list)
resources: Annotated[list[_ResourceV1], name_sorter] = Field(default_factory=list)
connections: Annotated[list[_ConnectionV1], connection_sorter] = Field(default_factory=list)
connections: Annotated[list[_ConnectionV1], source_sorter] = Field(default_factory=list)
input_params: list[Name] = Field(default_factory=list)
local_variables: list[str] = Field(default_factory=list)
linked_params: Annotated[list[_ParamLinkV1], connection_sorter] = Field(default_factory=list)
linked_params: Annotated[list[_ParamLinkV1], source_sorter] = Field(default_factory=list)
meta: dict[str, Any] = Field(default_factory=dict)

model_config = ConfigDict(title="Routine")
Expand Down

0 comments on commit e54a02a

Please sign in to comment.