From 4d6a5920aa8c96577d4993d7c028d9d8a0d4f66d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:37:12 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks --- moabb/datasets/download.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moabb/datasets/download.py b/moabb/datasets/download.py index 48507203c..d2fec1a11 100644 --- a/moabb/datasets/download.py +++ b/moabb/datasets/download.py @@ -220,16 +220,16 @@ def fs_get_file_list(article_id, version=None): fsurl = "https://api.figshare.com/v2" all_files = [] page = 1 - + while True: if version is None: url = f"{fsurl}/articles/{article_id}/files?page={page}&page_size=100" headers = {"Content-Type": "application/json"} response = fs_issue_request("GET", url, headers=headers) - + if not response: # If response is empty, we've got all files break - + all_files.extend(response) page += 1 else: @@ -237,7 +237,7 @@ def fs_get_file_list(article_id, version=None): headers = {"Content-Type": "application/json"} request = fs_issue_request("GET", url, headers=headers) return request["files"] - + return all_files