Skip to content

Fix typos in comments and debug log message#4278

Merged
Wauplin merged 1 commit into
huggingface:mainfrom
Sanjays2402:fix/typos-in-comments-and-log
May 27, 2026
Merged

Fix typos in comments and debug log message#4278
Wauplin merged 1 commit into
huggingface:mainfrom
Sanjays2402:fix/typos-in-comments-and-log

Conversation

@Sanjays2402

@Sanjays2402 Sanjays2402 commented May 27, 2026

Copy link
Copy Markdown
Contributor

Small typo cleanup — comments and a debug log message only. No functional changes.

What

File Before After
src/huggingface_hub/constants.py # Timeout of aquiring file lock… # Timeout of acquiring file lock…
src/huggingface_hub/file_download.py # …give up. Tre retry mechanism… # …give up. The retry mechanism…
src/huggingface_hub/hf_api.py (create_commit debug log) {len(copies)} copie(s) {len(copies)} copy(ies)
src/huggingface_hub/hf_api.py (SSE comment) # Keep-alives are sent as empty data: messages # Keep-alive messages are sent as empty data: events

Why

All four were caught by codespell against src/. The copie(s) one is a user-visible logger.debug line; the other three are inline comments. Each fix is one or two tokens — easy to review and revert if needed.

Out of scope (intentionally not touched)

  • cachable in hf_file_system.py — that's the fsspec AbstractFileSystem.cachable class attribute, not a typo.
  • uncommited in _hot_reload/types.py — it's a TypedDict field name that matches a documented API contract.
  • Typos in tests/ — those are inside test fixture string literals (e.g. "spaeces/user/id" # with typo in repo type) and changing them would break the test intent.
  • Translated docs (docs/source/de/… etc.) — left for native speakers.

Test

No behavioural change, no new tests needed. make quality and make style are no-ops on a comment/string change like this.


Note

Low Risk
String-only edits to comments and debug logging; no runtime, API, or security impact.

Overview
This PR is comment and log-string typo cleanup only — no behavior changes.

It fixes codespell issues in constants.py (file-lock comment: acquiring), file_download.py (download retry comment: The), and hf_api.py (commit debug log: copy(ies) instead of copie(s), plus a clearer SSE keep-alive comment for Space logs).

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

@Wauplin Wauplin 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.

thank you

@Wauplin Wauplin merged commit 5dc7bc8 into huggingface:main May 27, 2026
1 check passed
@huggingface-hub-bot

Copy link
Copy Markdown
Contributor

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

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