Skip to content

Commit a3ccd84

Browse files
committed
fix: change name func
1 parent e073ab5 commit a3ccd84

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

copernicusmarine/download_functions/download_original_files.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def download_files(
218218
pathlib.Path.mkdir(parent_dir, parents=True)
219219
if max_concurrent_requests:
220220
run_concurrently(
221-
_original_files_file_download,
221+
_download_one_file,
222222
[
223223
(username, endpoint_url, bucket, in_file, out_file)
224224
for in_file, out_file in zip(
@@ -240,7 +240,7 @@ def download_files(
240240
desc="Downloading files",
241241
) as pbar:
242242
for in_file, out_file in zip(filenames_in, filenames_out):
243-
_original_files_file_download(
243+
_download_one_file(
244244
username, endpoint_url, bucket, in_file, out_file
245245
)
246246
pbar.update(1)
@@ -511,16 +511,13 @@ def _get_file_size_and_last_modified(
511511
raise e
512512

513513

514-
def _original_files_file_download(
514+
def _download_one_file(
515515
username,
516516
endpoint_url: str,
517517
bucket: str,
518518
file_in: str,
519519
file_out: pathlib.Path,
520-
) -> pathlib.Path:
521-
"""
522-
Download ONE file and return the path of the result
523-
"""
520+
) -> None:
524521
s3_client, s3_resource = get_configured_boto3_session(
525522
endpoint_url,
526523
["GetObject", "HeadObject"],
@@ -547,8 +544,6 @@ def _original_files_file_download(
547544
f"of the file {file_out} is denied."
548545
)
549546

550-
return file_out
551-
552547

553548
# /////////////////////////////
554549
# --- Tools

0 commit comments

Comments
 (0)