Skip to content

Commit f67ee61

Browse files
committed
chore: use Execution in data_access.py
The ExecutionResponse is just an alias so unify the types in the file to keep things simpler. JIRA: CQ-1387 risk: low
1 parent 2272a95 commit f67ee61

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

gooddata-pandas/gooddata_pandas/data_access.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
CatalogAttribute,
1010
Execution,
1111
ExecutionDefinition,
12-
ExecutionResponse,
1312
Filter,
1413
GoodDataSdk,
1514
Metric,
@@ -258,7 +257,7 @@ def _compute(
258257
columns: ColumnsDef,
259258
index_by: Optional[IndexDef] = None,
260259
filter_by: Optional[Union[Filter, list[Filter]]] = None,
261-
) -> tuple[ExecutionResponse, dict[str, int], dict[str, int], dict[str, int]]:
260+
) -> tuple[Execution, dict[str, int], dict[str, int], dict[str, int]]:
262261
"""
263262
Internal function that computes an execution-by-convention to retrieve data for a data frame with the provided
264263
columns, optionally indexed by the index_by label and optionally filtered.
@@ -272,7 +271,7 @@ def _compute(
272271
273272
Returns:
274273
tuple: A tuple containing the following elements:
275-
- ExecutionResponse: The execution response.
274+
- Execution: The execution response.
276275
- dict[str, int]: A mapping of pandas column names to attribute dimension indices.
277276
- dict[str, int]: A mapping of pandas column names to metric dimension indices.
278277
- dict[str, int]: A mapping of pandas index names to attribute dimension indices.
@@ -300,12 +299,12 @@ def _compute(
300299
#
301300

302301

303-
def _extract_for_metrics_only(response: ExecutionResponse, cols: list, col_to_metric_idx: dict) -> dict:
302+
def _extract_for_metrics_only(response: Execution, cols: list, col_to_metric_idx: dict) -> dict:
304303
"""
305304
Internal function that extracts data for metrics-only columns when there are no attribute columns.
306305
307306
Args:
308-
response (ExecutionResponse): The execution response to extract data from.
307+
response (Execution): The execution response to extract data from.
309308
cols (list): A list of column names.
310309
col_to_metric_idx (dict): A mapping of pandas column names to metric dimension indices.
311310
@@ -346,7 +345,7 @@ def _typed_result(attributes: list[CatalogAttribute], attribute: Attribute, resu
346345

347346

348347
def _extract_from_attributes_and_maybe_metrics(
349-
response: ExecutionResponse,
348+
response: Execution,
350349
attributes: list[CatalogAttribute],
351350
cols: list[str],
352351
col_to_attr_idx: dict[str, int],
@@ -358,7 +357,7 @@ def _extract_from_attributes_and_maybe_metrics(
358357
optionally metrics columns.
359358
360359
Args:
361-
response (ExecutionResponse): The execution response to extract data from.
360+
response (Execution): The execution response to extract data from.
362361
attributes (list[CatalogAttribute]): The catalog of attributes.
363362
cols (list[str]): A list of column names.
364363
col_to_attr_idx (dict[str, int]): A mapping of pandas column names to attribute dimension indices.

0 commit comments

Comments
 (0)