From 60dcc688f3e383df2bdefe5bed454af09fe3bb96 Mon Sep 17 00:00:00 2001 From: Lucain Date: Mon, 26 Sep 2022 16:28:45 +0200 Subject: [PATCH] patch CI_HUB_TOKEN_PATH with Path instead of str (#5026) * patch CI_HUB_TOKEN_PATH with Path instead of str * flake8 --- tests/fixtures/hub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/hub.py b/tests/fixtures/hub.py index 4805e6acd06..05411df1feb 100644 --- a/tests/fixtures/hub.py +++ b/tests/fixtures/hub.py @@ -1,6 +1,6 @@ -import os.path import time from contextlib import contextmanager +from pathlib import Path from unittest.mock import patch import pytest @@ -16,7 +16,7 @@ CI_HUB_ENDPOINT = "https://hub-ci.huggingface.co" CI_HUB_DATASETS_URL = CI_HUB_ENDPOINT + "/datasets/{repo_id}/resolve/{revision}/{path}" -CI_HUB_TOKEN_PATH = os.path.expanduser("~/.huggingface/hub_ci_token") +CI_HUB_TOKEN_PATH = Path("~/.huggingface/hub_ci_token").expanduser() @pytest.fixture