mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-23 09:46:00 +00:00
chore(jobs): annotate ensure_dataset_available api param as HfApi
Add the missing HfApi type hint via a TYPE_CHECKING import.
This commit is contained in:
@@ -23,9 +23,13 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from huggingface_hub import HfApi
|
||||||
|
|
||||||
|
|
||||||
def ensure_dataset_available(repo_id: str, *, api, tags: list[str] | None = None) -> None:
|
def ensure_dataset_available(repo_id: str, *, api: HfApi, tags: list[str] | None = None) -> None:
|
||||||
"""Ensure repo_id resolves on the Hub, pushing a local-only dataset privately first.
|
"""Ensure repo_id resolves on the Hub, pushing a local-only dataset privately first.
|
||||||
|
|
||||||
`tags` are attached to the dataset only when we push it (an already-on-Hub
|
`tags` are attached to the dataset only when we push it (an already-on-Hub
|
||||||
|
|||||||
Reference in New Issue
Block a user