From 7d188ca2fb006e348b3087b3e7b2fb2f44757f43 Mon Sep 17 00:00:00 2001 From: Sylvain Lesage Date: Fri, 23 Aug 2024 21:57:32 +0000 Subject: [PATCH] fix types --- services/worker/tests/fixtures/files.py | 4 ++-- services/worker/tests/fixtures/hub.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/worker/tests/fixtures/files.py b/services/worker/tests/fixtures/files.py index 47a93db40..76758b2e5 100644 --- a/services/worker/tests/fixtures/files.py +++ b/services/worker/tests/fixtures/files.py @@ -131,7 +131,7 @@ def n_configs_paths(tmp_path_factory: pytest.TempPathFactory) -> list[str]: ] with open(readme, "w", newline="") as f: f.writelines(f"{line}\n" for line in lines) - files = [readme] + files = [str(readme)] for i in range(N): config_name = f"config{i}" path = directory / f"{config_name}.csv" @@ -140,5 +140,5 @@ def n_configs_paths(tmp_path_factory: pytest.TempPathFactory) -> list[str]: writer.writeheader() for _ in range(1000): writer.writerow({"text": config_name}) - files.append(path) + files.append(str(path)) return files diff --git a/services/worker/tests/fixtures/hub.py b/services/worker/tests/fixtures/hub.py index de8eef058..d799bd7ab 100644 --- a/services/worker/tests/fixtures/hub.py +++ b/services/worker/tests/fixtures/hub.py @@ -255,7 +255,7 @@ def hub_public_big_no_info(datasets: Mapping[str, Dataset]) -> Iterator[str]: @pytest.fixture(scope="session") -def hub_public_n_configs(n_configs_paths: str) -> Iterator[str]: +def hub_public_n_configs(n_configs_paths: list[str]) -> Iterator[str]: repo_id = create_hub_dataset_repo(prefix="n-configs", file_paths=n_configs_paths) yield repo_id delete_hub_dataset_repo(repo_id=repo_id)