Skip to content

Commit 442b9e9

Browse files
committed
fix pre-commit checks
1 parent 2060b61 commit 442b9e9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

application_sdk/outputs/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from temporalio import activity
2626

2727
from application_sdk.activities.common.models import ActivityStatistics
28-
from application_sdk.activities.common.utils import get_object_store_prefix, build_output_path
28+
from application_sdk.activities.common.utils import get_object_store_prefix
2929
from application_sdk.common.dataframe_utils import is_empty_dataframe
3030
from application_sdk.observability.logger_adaptor import get_logger
3131
from application_sdk.observability.metrics_adaptor import MetricType
@@ -391,7 +391,9 @@ async def _flush_buffer(self, chunk: "pd.DataFrame", chunk_part: int):
391391
logger.error(f"Error flushing buffer to files: {str(e)}")
392392
raise e
393393

394-
async def write_statistics(self, typename: Optional[str] = None) -> Optional[Dict[str, Any]]:
394+
async def write_statistics(
395+
self, typename: Optional[str] = None
396+
) -> Optional[Dict[str, Any]]:
395397
"""Write statistics about the output to a JSON file.
396398
397399
This method writes statistics including total record count and chunk count

tests/unit/outputs/test_output.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ async def test_write_statistics_success(self):
141141
}
142142
expected_stats_dir = os.path.join("/test/path", "statistics")
143143
mock_makedirs.assert_called_once_with(expected_stats_dir, exist_ok=True)
144-
expected_file_path = os.path.join(expected_stats_dir, "statistics.json.ignore")
144+
expected_file_path = os.path.join(
145+
expected_stats_dir, "statistics.json.ignore"
146+
)
145147
mock_file.assert_called_once_with(expected_file_path, "wb")
146148
mock_orjson.assert_called_once_with(
147149
{
@@ -154,7 +156,9 @@ async def test_write_statistics_success(self):
154156
mock_push.assert_awaited_once()
155157
upload_kwargs = mock_push.await_args.kwargs # type: ignore[attr-defined]
156158
assert upload_kwargs["source"] == expected_file_path
157-
assert upload_kwargs["destination"] == "path/statistics/statistics.json.ignore"
159+
assert (
160+
upload_kwargs["destination"] == "path/statistics/statistics.json.ignore"
161+
)
158162

159163
@pytest.mark.asyncio
160164
async def test_write_statistics_error(self):

0 commit comments

Comments
 (0)