|
14 | 14 |
|
15 | 15 | import httpx |
16 | 16 |
|
17 | | -from . import ( |
18 | | - __version__, # noqa: F401 # for backward compatibility |
19 | | - constants, |
20 | | -) |
| 17 | +from . import constants |
21 | 18 | from ._local_folder import get_local_download_paths, read_download_metadata, write_download_metadata |
22 | | -from .constants import ( |
23 | | - HUGGINGFACE_CO_URL_TEMPLATE, # noqa: F401 # for backward compatibility |
24 | | - HUGGINGFACE_HUB_CACHE, # noqa: F401 # for backward compatibility |
25 | | -) |
26 | 19 | from .errors import ( |
27 | 20 | FileMetadataError, |
28 | 21 | GatedRepoError, |
|
38 | 31 | WeakFileLock, |
39 | 32 | XetFileData, |
40 | 33 | build_hf_headers, |
41 | | - get_fastai_version, # noqa: F401 # for backward compatibility |
42 | | - get_fastcore_version, # noqa: F401 # for backward compatibility |
43 | | - get_graphviz_version, # noqa: F401 # for backward compatibility |
44 | | - get_jinja_version, # noqa: F401 # for backward compatibility |
45 | | - get_pydot_version, # noqa: F401 # for backward compatibility |
46 | | - get_tf_version, # noqa: F401 # for backward compatibility |
47 | | - get_torch_version, # noqa: F401 # for backward compatibility |
48 | 34 | hf_raise_for_status, |
49 | | - is_fastai_available, # noqa: F401 # for backward compatibility |
50 | | - is_fastcore_available, # noqa: F401 # for backward compatibility |
51 | | - is_graphviz_available, # noqa: F401 # for backward compatibility |
52 | | - is_jinja_available, # noqa: F401 # for backward compatibility |
53 | | - is_pydot_available, # noqa: F401 # for backward compatibility |
54 | | - is_tf_available, # noqa: F401 # for backward compatibility |
55 | | - is_torch_available, # noqa: F401 # for backward compatibility |
56 | 35 | logging, |
57 | 36 | parse_xet_file_data_from_response, |
58 | 37 | refresh_xet_connection_info, |
59 | 38 | tqdm, |
60 | 39 | validate_hf_hub_args, |
61 | 40 | ) |
62 | 41 | from .utils._http import _adjust_range_header, http_backoff, http_stream_backoff |
63 | | -from .utils._runtime import _PY_VERSION, is_xet_available # noqa: F401 # for backward compatibility |
| 42 | +from .utils._runtime import is_xet_available |
64 | 43 | from .utils._typing import HTTP_METHOD_T |
65 | 44 | from .utils.sha import sha_fileobj |
66 | 45 | from .utils.tqdm import _get_progress_bar_context |
@@ -250,7 +229,7 @@ def hf_hub_url( |
250 | 229 |
|
251 | 230 | if revision is None: |
252 | 231 | revision = constants.DEFAULT_REVISION |
253 | | - url = HUGGINGFACE_CO_URL_TEMPLATE.format( |
| 232 | + url = constants.HUGGINGFACE_CO_URL_TEMPLATE.format( |
254 | 233 | repo_id=repo_id, revision=quote(revision, safe=""), filename=quote(filename) |
255 | 234 | ) |
256 | 235 | # Update endpoint if provided |
|
0 commit comments