From 2f31d7d66ca1fcddcf0e4041e0d6c7c317d727b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Jose=CC=81=20Pereira=20Vieito?= Date: Fri, 17 Jan 2025 10:30:39 +0100 Subject: [PATCH] =?UTF-8?q?Updated=20implementation=20of=20=E2=80=9Coverwr?= =?UTF-8?q?ite=5Ffiles=E2=80=9D=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- awswrangler/s3/_write.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awswrangler/s3/_write.py b/awswrangler/s3/_write.py index 39682455f..6cc120da8 100644 --- a/awswrangler/s3/_write.py +++ b/awswrangler/s3/_write.py @@ -107,7 +107,8 @@ def _validate_args( if mode == "overwrite_files" and (max_rows_by_file or bucketing_info): raise exceptions.InvalidArgumentValue( "When mode is set to 'overwrite_files', the " - "`max_rows_by_file` and `bucketing_info` arguments cannot be set.") + "`max_rows_by_file` and `bucketing_info` arguments cannot be set." + ) if any(arg is not None for arg in (table, description, parameters, columns_comments, columns_parameters)): raise exceptions.InvalidArgumentCombination( "Please pass dataset=True to be able to use any one of these " @@ -298,8 +299,7 @@ def write( # noqa: PLR0913 dtype = dtype if dtype else {} partitions_values: dict[str, list[str]] = {} - mode, filename_prefix = _compose_filename_prefix_for_mode( - mode=mode, filename_prefix=filename_prefix) + mode, filename_prefix = _compose_filename_prefix_for_mode(mode=mode, filename_prefix=filename_prefix) mode = "append" if mode is None else mode cpus: int = _utils.ensure_cpu_count(use_threads=use_threads) s3_client = _utils.client(service_name="s3", session=boto3_session)