Skip to content

Commit 2f76aa6

Browse files
fix PipelineDetails warning
1 parent 4a09ad8 commit 2f76aa6

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

packages/pytest-simcore/src/pytest_simcore/services_api_mocks_for_aiohttp_clients.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
PresignedLink,
2424
)
2525
from models_library.generics import Envelope
26-
from models_library.projects_pipeline import ComputationTask
26+
from models_library.projects_pipeline import ComputationTask, PipelineDetails
2727
from models_library.projects_state import RunningState
2828
from models_library.utils.fastapi_encoders import jsonable_encoder
2929
from pydantic import AnyUrl, ByteSize, TypeAdapter
@@ -111,11 +111,13 @@ def create_computation_cb(url, **kwargs) -> CallbackResult:
111111
update={
112112
"id": f"{kwargs['json']['project_id']}",
113113
"state": state,
114-
"pipeline_details": {
115-
"adjacency_list": pipeline,
116-
"node_states": node_states,
117-
"progress": 0,
118-
},
114+
"pipeline_details": PipelineDetails(
115+
**{
116+
"adjacency_list": pipeline,
117+
"node_states": node_states,
118+
"progress": 0,
119+
}
120+
),
119121
}
120122
)
121123
return CallbackResult(
@@ -140,11 +142,13 @@ def get_computation_cb(url, **kwargs) -> CallbackResult:
140142
update={
141143
"id": Path(url.path).name,
142144
"state": state,
143-
"pipeline_details": {
144-
"adjacency_list": pipeline,
145-
"node_states": node_states,
146-
"progress": 0,
147-
},
145+
"pipeline_details": PipelineDetails(
146+
**{
147+
"adjacency_list": pipeline,
148+
"node_states": node_states,
149+
"progress": 0,
150+
}
151+
),
148152
}
149153
)
150154

0 commit comments

Comments
 (0)