Skip to content

Commit

Permalink
fix typo again
Browse files Browse the repository at this point in the history
  • Loading branch information
hanouticelina committed Oct 21, 2024
1 parent 92a93f0 commit 2cb1bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/huggingface_hub/hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3073,7 +3073,7 @@ def list_repo_tree(
headers = self._build_hf_headers(token=token)

encoded_path_in_repo = "/" + quote(path_in_repo, safe="") if path_in_repo else ""
tree_url = f"{self.endpoint}/api/{repo_type}s/{repo_id}/tree/{revision}/{encoded_path_in_repo}"
tree_url = f"{self.endpoint}/api/{repo_type}s/{repo_id}/tree/{revision}{encoded_path_in_repo}"
for path_info in paginate(path=tree_url, headers=headers, params={"recursive": recursive, "expand": expand}):
yield (RepoFile(**path_info) if path_info["type"] == "file" else RepoFolder(**path_info))

Expand Down

0 comments on commit 2cb1bfb

Please sign in to comment.