Skip to content

Commit 2f31d7d

Browse files
committed
Updated implementation of “overwrite_files” mode
1 parent 10e30c1 commit 2f31d7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

awswrangler/s3/_write.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ def _validate_args(
107107
if mode == "overwrite_files" and (max_rows_by_file or bucketing_info):
108108
raise exceptions.InvalidArgumentValue(
109109
"When mode is set to 'overwrite_files', the "
110-
"`max_rows_by_file` and `bucketing_info` arguments cannot be set.")
110+
"`max_rows_by_file` and `bucketing_info` arguments cannot be set."
111+
)
111112
if any(arg is not None for arg in (table, description, parameters, columns_comments, columns_parameters)):
112113
raise exceptions.InvalidArgumentCombination(
113114
"Please pass dataset=True to be able to use any one of these "
@@ -298,8 +299,7 @@ def write( # noqa: PLR0913
298299
dtype = dtype if dtype else {}
299300
partitions_values: dict[str, list[str]] = {}
300301

301-
mode, filename_prefix = _compose_filename_prefix_for_mode(
302-
mode=mode, filename_prefix=filename_prefix)
302+
mode, filename_prefix = _compose_filename_prefix_for_mode(mode=mode, filename_prefix=filename_prefix)
303303
mode = "append" if mode is None else mode
304304
cpus: int = _utils.ensure_cpu_count(use_threads=use_threads)
305305
s3_client = _utils.client(service_name="s3", session=boto3_session)

0 commit comments

Comments
 (0)