|
3 | 3 | from returns.curry import partial |
4 | 4 | from returns.io import IOResultE |
5 | 5 | from returns.pipeline import flow |
6 | | -from returns.pointfree import map_ |
| 6 | +from returns.pointfree import bind |
7 | 7 |
|
8 | 8 | from lomas_client.constants import DUMMY_NB_ROWS, DUMMY_SEED |
9 | 9 | from lomas_client.http_client import LomasHttpClient |
@@ -104,7 +104,7 @@ def cost( |
104 | 104 | body_json, |
105 | 105 | OpenDPRequestModel.model_validate, |
106 | 106 | partial(self.http_client.post, "estimate_opendp_cost"), |
107 | | - map_(validate_model_response(self.http_client, CostResponse)), |
| 107 | + bind(validate_model_response(self.http_client, CostResponse)), |
108 | 108 | ) |
109 | 109 |
|
110 | 110 | def query( |
@@ -154,11 +154,11 @@ def query( |
154 | 154 | {**body_dict, "dummy_nb_rows": nb_rows, "dummy_seed": seed}, |
155 | 155 | OpenDPDummyQueryModel.model_validate, |
156 | 156 | partial(self.http_client.post, "dummy_opendp_query"), |
157 | | - map_(validate_model_response(self.http_client, QueryResponse)), |
| 157 | + bind(validate_model_response(self.http_client, QueryResponse)), |
158 | 158 | ) |
159 | 159 | return flow( |
160 | 160 | body_dict, |
161 | 161 | OpenDPQueryModel.model_validate, |
162 | 162 | partial(self.http_client.post, "opendp_query"), |
163 | | - map_(validate_model_response(self.http_client, QueryResponse)), |
| 163 | + bind(validate_model_response(self.http_client, QueryResponse)), |
164 | 164 | ) |
0 commit comments