Skip to content

Commit e1a981b

Browse files
committed
fix: types
1 parent fa9b1d8 commit e1a981b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

awswrangler/distributed/ray/_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, max_concurrency: int) -> None:
3939
super().__init__()
4040

4141
_logger.debug("Initializing Ray Actor with maximum concurrency %d", max_concurrency)
42-
self._actor: ray.actor.ActorHandle = AsyncActor.options(max_concurrency=max_concurrency).remote() # type: ignore[attr-defined]
42+
self._actor: "ray.actor.ActorHandle[AsyncActor]" = AsyncActor.options(max_concurrency=max_concurrency).remote() # type: ignore[attr-defined]
4343

4444
def map(self, func: Callable[..., MapOutputType], _: "BaseClient" | None, *args: Any) -> list[MapOutputType]:
4545
"""Map func and return ray futures."""

awswrangler/distributed/ray/datasources/arrow_parquet_datasource.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ def get_read_tasks(self, parallelism: int) -> list[ReadTask]:
344344

345345
meta = self._meta_provider(
346346
paths, # type: ignore[arg-type]
347-
self._inferred_schema,
348347
num_fragments=len(fragments),
349348
prefetched_metadata=metadata,
350349
)
@@ -566,7 +565,7 @@ def compute_batch_size_rows(sample_info: _SampleInfo) -> int:
566565
if sample_info.actual_bytes_per_row is None:
567566
return PARQUET_READER_ROW_BATCH_SIZE
568567
else:
569-
max_parquet_reader_row_batch_size_bytes = DataContext.get_current().target_max_block_size // 10
568+
max_parquet_reader_row_batch_size_bytes = DataContext.get_current().target_max_block_size // 10 # type: ignore[operator]
570569
return max(
571570
1,
572571
min(

awswrangler/distributed/ray/datasources/file_datasink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _write_block(write_path: str, block: pd.DataFrame) -> str:
7878
write_path = self.path
7979

8080
if write_path.endswith("/"):
81-
filename = self.filename_provider.get_filename_for_block(block, ctx.task_idx, 0)
81+
filename = self.filename_provider.get_filename_for_block(block, "", ctx.task_idx, 0)
8282
write_path = posixpath.join(self.path, filename)
8383

8484
return _write_block(write_path, block)

awswrangler/distributed/ray/datasources/filename_provider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ def __init__(
2626
def get_filename_for_block(
2727
self,
2828
block: Block,
29+
write_uuid: str,
2930
task_index: int,
3031
block_index: int,
3132
) -> str:
3233
file_id = f"{task_index:06}_{block_index:06}"
3334
return self._generate_filename(file_id)
3435

35-
def get_filename_for_row(self, row: dict[str, Any], task_index: int, block_index: int, row_index: int) -> str:
36+
def get_filename_for_row(self, row: dict[str, Any], write_uuid: str, task_index: int, block_index: int, row_index: int) -> str:
3637
file_id = f"{task_index:06}_{block_index:06}_{row_index:06}"
3738
return self._generate_filename(file_id)
3839

0 commit comments

Comments
 (0)