[Docs] Document missing endpoint and template_str parameters#4298
Merged
Wauplin merged 1 commit intoJun 1, 2026
Conversation
- file_download.py: add `endpoint` to hf_hub_download Args - _snapshot_download.py: add `endpoint` to snapshot_download Args - repocard.py: add `template_str` to RepoCard / ModelCard / DatasetCard from_template Args (×3) All five parameters are already in the signatures; this only fills the docstrings. Same shape as huggingface#4289.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4298 +/- ##
==========================================
+ Coverage 75.00% 75.93% +0.93%
==========================================
Files 145 172 +27
Lines 13978 20167 +6189
==========================================
+ Hits 10484 15314 +4830
- Misses 3494 4853 +1359 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Wauplin
pushed a commit
that referenced
this pull request
Jun 2, 2026
…les (#4300) - file_download.py: add `endpoint` to hf_hub_url Args - hf_api.py: fix preupload_lfs_files Args block — rename `operations` to `additions` (matches the actual parameter name) and add the missing `free_memory` entry All three parameters are already in the signatures; this only fills the docstrings. Same shape as #4298.
Contributor
|
This PR has been shipped as part of the v1.18.0 release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fills five
Argsentries that exist in the public-API signatures but aren't documented. Same shape as #4289 — pure docstring additions, no behaviour change.hf_hub_download— addendpoint(file_download.py).snapshot_download— addendpoint(_snapshot_download.py).RepoCard.from_template/ModelCard.from_template/DatasetCard.from_template— addtemplate_str(repocard.py, three docstrings).endpointtext matches the wording introduced forlfs.py/repocard_data.pyin #4289 ("The Hub endpoint to send the request to. Defaults to the value ofHF_ENDPOINT.").template_strtext notes the precedence rule the implementation already enforces (template_pathoverridestemplate_strwhen both are supplied).make styleandmake qualityclean.Note
Low Risk
Docstring-only updates with no code or behavior changes.
Overview
Documents five public API parameters that were already in function signatures but missing from Args sections—no runtime changes.
Download APIs:
hf_hub_download(file_download.py) andsnapshot_download(_snapshot_download.py) now documentendpoint(Hub URL; defaults toHF_ENDPOINT), aligned with wording from #4289.Repo cards:
RepoCard.from_template,ModelCard.from_template, andDatasetCard.from_template(repocard.py) now documenttemplate_strfor inline Jinja templates, including thattemplate_pathtakes precedence when both are set.Reviewed by Cursor Bugbot for commit 7ff8c4d. Bugbot is set up for automated code reviews on this repo. Configure here.