@@ -55,13 +55,11 @@ def register_ray() -> None:
5555 ]:
5656 engine .register_func (func , ray_remote ()(func ))
5757
58- for o_f , d_f in {
59- _get_executor : _get_ray_executor ,
60- _list_objects_paginate : _list_objects_s3fs ,
61- _read_parquet_metadata_file : ray_remote ()(_read_parquet_metadata_file_distributed ),
62- ensure_worker_or_thread_count : ensure_worker_count ,
63- }.items ():
64- engine .register_func (o_f , d_f ) # type: ignore[arg-type]
58+ # Register dispatch methods for Ray
59+ engine .register_func (_get_executor , _get_ray_executor )
60+ engine .register_func (_list_objects_paginate , _list_objects_s3fs )
61+ engine .register_func (_read_parquet_metadata_file , ray_remote ()(_read_parquet_metadata_file_distributed ))
62+ engine .register_func (ensure_worker_or_thread_count , ensure_worker_count )
6563
6664 if memory_format .get () == MemoryFormatEnum .MODIN :
6765 from awswrangler .distributed .ray .modin ._data_types import pyarrow_types_from_pandas_distributed
@@ -80,17 +78,15 @@ def register_ray() -> None:
8078 from awswrangler .distributed .ray .modin .s3 ._write_parquet import _to_parquet_distributed
8179 from awswrangler .distributed .ray .modin .s3 ._write_text import _to_text_distributed
8280
83- for o_f , d_f in {
84- pyarrow_types_from_pandas : pyarrow_types_from_pandas_distributed ,
85- _read_parquet : _read_parquet_distributed ,
86- _read_text : _read_text_distributed ,
87- _to_buckets : _to_buckets_distributed ,
88- _to_parquet : _to_parquet_distributed ,
89- _to_partitions : _to_partitions_distributed ,
90- _to_text : _to_text_distributed ,
91- copy_df_shallow : _copy_modin_df_shallow ,
92- is_pandas_frame : _is_pandas_or_modin_frame ,
93- split_pandas_frame : _split_modin_frame ,
94- table_refs_to_df : _arrow_refs_to_df ,
95- }.items ():
96- engine .register_func (o_f , d_f ) # type: ignore[arg-type]
81+ # Register dispatch methods for Modin
82+ engine .register_func (pyarrow_types_from_pandas , pyarrow_types_from_pandas_distributed )
83+ engine .register_func (_read_parquet , _read_parquet_distributed )
84+ engine .register_func (_read_text , _read_text_distributed )
85+ engine .register_func (_to_buckets , _to_buckets_distributed )
86+ engine .register_func (_to_parquet , _to_parquet_distributed )
87+ engine .register_func (_to_partitions , _to_partitions_distributed )
88+ engine .register_func (_to_text , _to_text_distributed )
89+ engine .register_func (copy_df_shallow , _copy_modin_df_shallow )
90+ engine .register_func (is_pandas_frame , _is_pandas_or_modin_frame )
91+ engine .register_func (split_pandas_frame , _split_modin_frame )
92+ engine .register_func (table_refs_to_df , _arrow_refs_to_df )
0 commit comments