Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/gooddata-pandas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ test = [
]

[tool.ty.analysis]
allowed-unresolved-imports = ["gooddata_api_client"]
# The `.**` glob matches gooddata-sdk: leaf model modules are imported directly rather than
# through the `gooddata_api_client.models` aggregate, and ty cannot resolve the generated code.
allowed-unresolved-imports = ["gooddata_api_client.**"]

[tool.hatch.build.targets.wheel]
packages = ["src/gooddata_pandas"]
Expand Down
10 changes: 3 additions & 7 deletions packages/gooddata-pandas/src/gooddata_pandas/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pyarrow as pa

import pandas
from gooddata_api_client import models
from gooddata_api_client.model.afm_execution_response import AfmExecutionResponse
from gooddata_sdk import (
Attribute,
BareExecutionResponse,
Expand Down Expand Up @@ -691,9 +691,7 @@ def for_exec_result_id(
exec_response = BareExecutionResponse(
api_client=self._sdk.client,
workspace_id=self._workspace_id,
execution_response=models.AfmExecutionResponse(
result_cache_metadata.execution_response, _check_type=False
),
execution_response=AfmExecutionResponse(result_cache_metadata.execution_response, _check_type=False),
)
table = exec_response.read_result_arrow(max_bytes=self._arrow_config.max_bytes)
return self._table_to_df_and_metadata(table, exec_response, label_overrides, grand_totals_position)
Expand All @@ -702,9 +700,7 @@ def for_exec_result_id(
execution_response=BareExecutionResponse(
api_client=self._sdk.client,
workspace_id=self._workspace_id,
execution_response=models.AfmExecutionResponse(
result_cache_metadata.execution_response, _check_type=False
),
execution_response=AfmExecutionResponse(result_cache_metadata.execution_response, _check_type=False),
),
result_cache_metadata=result_cache_metadata,
label_overrides=label_overrides,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ def test_for_exec_result_id_arrow_types_mapper(tmp_path: Path) -> None:

with (
patch("gooddata_pandas.dataframe.BareExecutionResponse") as MockBareExec,
patch("gooddata_pandas.dataframe.models.AfmExecutionResponse"),
patch("gooddata_pandas.dataframe.AfmExecutionResponse"),
):
mock_bare = MagicMock()
mock_bare.read_result_arrow.return_value = table
Expand Down
Loading
Loading