Skip to content

fix local_files_only grammar#4255

Merged
hanouticelina merged 3 commits into
huggingface:mainfrom
hunterhogan:patch-1
May 26, 2026
Merged

fix local_files_only grammar#4255
hanouticelina merged 3 commits into
huggingface:mainfrom
hunterhogan:patch-1

Conversation

@hunterhogan

@hunterhogan hunterhogan commented May 23, 2026

Copy link
Copy Markdown
Contributor

Fix the conditional grammar in local_files_only. Then, since I was here, I skimmed the file for other user-facing grammar issues. I didn't read the comments, so I didn't edit those.


Note

Low Risk
Documentation and error-message punctuation only; no logic or API signature changes.

Overview
This PR only updates user-facing documentation in snapshot_download (plus a short note on _AggregatedTqdm and a comma in a LocalEntryNotFoundError message). No runtime behavior changes.

The meaningful fix is the local_files_only parameter description: it no longer mirrors hf_hub_download’s “return the cached path if it exists” wording. It now states that when True, no files are downloaded, including when they are missing from cache_dir or local_dir—aligned with if not local_files_only: skipping Hub repo_info and the offline/cache fallback path.

The rest is copy-editing in the same docstring (punctuation, a priori, “cache system”, Oxford commas) and minor Raises-section formatting.

Reviewed by Cursor Bugbot for commit 35105f2. Bugbot is set up for automated code reviews on this repo. Configure here.

Fix the conditional grammar in `local_files_only`. Then, since I was here, I skimmed the file for other user-facing grammar issues. I didn't read the comments, so I didn't edit those.
@bot-ci-comment

Copy link
Copy Markdown

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

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.30%. Comparing base (1daa48b) to head (f1dbf87).
⚠️ Report is 363 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4255      +/-   ##
==========================================
+ Coverage   75.00%   77.30%   +2.30%     
==========================================
  Files         145      171      +26     
  Lines       13978    19615    +5637     
==========================================
+ Hits        10484    15164    +4680     
- Misses       3494     4451     +957     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hanouticelina

Copy link
Copy Markdown
Collaborator

@bot /style

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Style bot fixed some files and pushed the changes.

@hanouticelina hanouticelina self-requested a review May 26, 2026 09:20

@hanouticelina hanouticelina left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hanouticelina hanouticelina merged commit 70e5415 into huggingface:main May 26, 2026
16 of 17 checks passed
@hunterhogan

Copy link
Copy Markdown
Contributor Author

Thanks!

Thank you!

@hunterhogan hunterhogan deleted the patch-1 branch May 26, 2026 10:43
@huggingface-hub-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped as part of the v1.17.0 release.

@hunterhogan

Copy link
Copy Markdown
Contributor Author

This PR has been shipped as part of the v1.17.0 release.

I've been released!

😈 muuuuuhahahahahaha!

uh ... I mean, that's great! 👼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants