Skip to content

Commit 48c26fa

Browse files
Apply style fixes
1 parent 1292211 commit 48c26fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/huggingface_hub/hf_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,14 @@ def repo_type_and_id_from_hf_id(hf_id: str, hub_url: Optional[str] = None) -> tu
238238

239239
hub_url = hub_url if hub_url is not None else constants.ENDPOINT
240240
is_hf_url = hub_url in hf_id and "@" not in hf_id
241-
241+
242242
hub_url = hub_url.rstrip("/")
243243
if hf_id.startswith(hub_url):
244-
hf_id = hf_id[len(hub_url):].lstrip("/")
244+
hf_id = hf_id[len(hub_url) :].lstrip("/")
245245
elif hf_id.startswith(hub_url.replace("https://", "").replace("http://", "")):
246-
# Handle urls like "localhost:8080/hf/model/xxx"
246+
# Handle urls like "localhost:8080/hf/model/xxx"
247247
# https://github.com/huggingface/huggingface_hub/issues/3494
248-
hf_id = hf_id[len(hub_url.replace("https://", "").replace("http://", "")):].lstrip("/")
248+
hf_id = hf_id[len(hub_url.replace("https://", "").replace("http://", "")) :].lstrip("/")
249249

250250
HFFS_PREFIX = "hf://"
251251
if hf_id.startswith(HFFS_PREFIX): # Remove "hf://" prefix if exists

0 commit comments

Comments
 (0)