diff --git a/src/huggingface_hub/snapshot_download.py b/src/huggingface_hub/snapshot_download.py index 888fcc1d8c..7e44925507 100644 --- a/src/huggingface_hub/snapshot_download.py +++ b/src/huggingface_hub/snapshot_download.py @@ -12,3 +12,4 @@ ) from ._snapshot_download import * # noqa +from .constants import REPO_ID_SEPARATOR # noqa diff --git a/tests/test_snapshot_download.py b/tests/test_snapshot_download.py index 09a4c75b26..89714ad3c9 100644 --- a/tests/test_snapshot_download.py +++ b/tests/test_snapshot_download.py @@ -358,3 +358,7 @@ def test_snapshot_download_import(): from huggingface_hub.snapshot_download import snapshot_download as x # noqa assert x is snapshot_download + + +def test_snapshot_download_import_constant_not_raise(): + from huggingface_hub.snapshot_download import REPO_ID_SEPARATOR # noqa