From e54a02a0e3bf5d0a64240ee0218e332ba6eecc4e Mon Sep 17 00:00:00 2001 From: mstechly Date: Tue, 21 May 2024 15:02:41 -0400 Subject: [PATCH] fix: change connection_sorter to source_sorter --- src/qref/_schema_v1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qref/_schema_v1.py b/src/qref/_schema_v1.py index 999ea22..f0a1b65 100644 --- a/src/qref/_schema_v1.py +++ b/src/qref/_schema_v1.py @@ -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): @@ -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")