AI Slop Code RIsk Monitor

huggingface/huggingface_hub

The official CLI and Python client for the Hugging Face Hub.

28.5 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for huggingface/huggingface_hub, a Python project with 3,978 GitHub stars. SynthScan examined 166,430 lines of code across 487 source files, recording 3898 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 28.5 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

28.5
Adjusted Signal
28.5
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
4.0K
Stars
Python
Language
166.4K
Lines of Code
487
Files
3.9K
Pattern Hits
2026-10-12
Scan Date
0.62
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 55.9/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 2549 finding(s).

Hallucinated Dependency & Supply Chain Risk 15.0/100 · LOW

Are imports declared and package/API names verified? 884 finding(s).

Agent Over-Engineering Ratio 62.1/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 2549 finding(s).

PR Review Velocity Impact 82.8/100 · CRITICAL

Which changes need focused human review? 3898 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 300MEDIUM 230LOW 3368

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 3898 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers1973 hits · 1689 pts
SeverityFileLineSnippetContext
LOWtests/test_local_folder.py43def test_creates_huggingface_dir_with_gitignore(tmp_path: Path):CODE
LOWtests/test_local_folder.py76def test_gitignore_lock_timeout_is_ignored(tmp_path: Path):CODE
LOW⚡tests/test_local_folder.py117def test_validate_relative_filename_rejects_unsafe(filename: str):CODE
LOW⚡tests/test_local_folder.py123def test_validate_relative_filename_accepts_safe(filename: str):CODE
LOW⚡tests/test_local_folder.py128def test_local_download_paths_rejects_unsafe_filename(tmp_path: Path, filename: str):CODE
LOW⚡tests/test_local_folder.py134def test_local_upload_paths_rejects_unsafe_filename(tmp_path: Path, filename: str):CODE
LOW⚡tests/test_local_folder.py139def test_local_download_paths(tmp_path: Path):CODE
LOWtests/test_local_folder.py168def test_local_download_paths_are_recreated_each_time(tmp_path: Path):CODE
LOWtests/test_local_folder.py182def test_local_download_paths_long_paths(tmp_path: Path):CODE
LOWtests/test_local_folder.py200def test_local_download_paths_long_local_dir(tmp_path: Path, cache_dir_len: int):CODE
LOWtests/test_local_folder.py225def test_write_download_metadata(tmp_path: Path):STRING
LOWtests/test_local_folder.py251def test_read_download_metadata_valid_metadata(tmp_path: Path):CODE
LOWtests/test_local_folder.py266def test_read_download_metadata_no_metadata(tmp_path: Path):CODE
LOWtests/test_local_folder.py272def test_read_download_metadata_corrupted_metadata(tmp_path: Path, caplog: pytest.LogCaptureFixture):CODE
LOWtests/test_local_folder.py286def test_read_download_metadata_correct_metadata_missing_file(tmp_path: Path):CODE
LOWtests/test_local_folder.py295def test_read_download_metadata_correct_metadata_but_outdated(tmp_path: Path):CODE
LOWtests/test_local_folder.py322def test_local_upload_paths_are_recreated_each_time(tmp_path: Path):CODE
LOWtests/test_local_folder.py336def test_local_upload_paths_long_paths(tmp_path: Path):CODE
LOWtests/test_utils_validators.py16 def test_validate_repo_id_as_arg(self, mocker) -> None:CODE
LOWtests/test_utils_validators.py22 def test_validate_repo_id_as_kwarg(self, mocker) -> None:CODE
LOW⚡tests/test_cli_errors.py35 def test_with_repo_id_and_type(self):CODE
LOW⚡tests/test_cli_errors.py43 def test_with_repo_id_dataset(self):CODE
LOW⚡tests/test_cli_errors.py49 def test_with_repo_id_no_type(self):CODE
LOWtests/test_cli_errors.py88 def test_with_repo_id_and_type(self):CODE
LOWtests/test_cli_errors.py93 def test_with_repo_id_no_type(self):CODE
LOWtests/test_cli_errors.py116 def test_with_repo_id_and_type(self):CODE
LOW⚡tests/test_cli_discussions.py94def test_list_discussions_quiet(repo_with_discussion: tuple):CODE
LOW⚡tests/test_cli_discussions.py103def test_list_discussions_json(repo_with_discussion: tuple):CODE
LOW⚡tests/test_cli_discussions.py114def test_list_filter_kind_discussion(repo_with_discussion: tuple):CODE
LOW⚡tests/test_cli_discussions.py123def test_list_filter_kind_pull_request(repo_with_discussion: tuple):CODE
LOW⚡tests/test_cli_discussions.py132def test_list_filter_status_closed(repo_with_discussion: tuple):CODE
LOW⚡tests/test_cli_discussions.py200def test_create_body_and_body_file_conflict(repo_for_write: str, tmp_path):CODE
LOWtests/test_cli_discussions.py189def test_create_with_body_file(repo_for_write: str, tmp_path):CODE
LOWtests/test_cli_discussions.py259def test_close_requires_confirmation(api: HfApi, repo_for_write: str):CODE
LOWtests/test_cli_discussions.py316def test_merge_requires_confirmation(api: HfApi, repo_for_write: str):CODE
LOWtests/test_xet_upload.py58def assert_xet_pipeline_upload():CODE
LOWtests/test_xet_upload.py168 def test_upload_file_with_bytesio(self, api, tmp_path, repo_url):CODE
LOWtests/test_xet_upload.py183 def test_upload_file_with_byte_array(self, api, tmp_path, repo_url):CODE
LOWtests/test_xet_upload.py198 def test_fallback_to_lfs_when_xet_not_available(self, api, repo_url):CODE
LOWtests/test_xet_upload.py208 def test_routes_to_xet_directly_when_available(self):CODE
LOWtests/test_xet_upload.py228 def test_transfers_bytesio_falls_back_to_lfs(self):CODE
LOWtests/test_xet_upload.py260 def test_request_headers_passed_to_upload_files(self, tmp_path):CODE
LOWtests/test_xet_upload.py295 def test_request_headers_passed_to_upload_bytes(self):CODE
LOWtests/test_xet_upload.py353 def test_upload_folder_create_pr(self, api, repo_url) -> None:CODE
LOWtests/test_xet_upload.py400 def test_hf_xet_download_with_new_session_api(self, api, tmp_path, repo_url):CODE
LOWtests/conftest.py38def reset_oauth_refresh_state():CODE
LOWtests/conftest.py52def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:CODE
LOWtests/conftest.py132def disable_symlinks_on_windows_ci(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/conftest.py148def disable_experimental_warnings(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/conftest.py171def production_endpoint_marker(request: SubRequest, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/conftest.py185def expect_deprecation_marker(request: SubRequest) -> Generator[None, None, None]:CODE
LOWtests/conftest.py192 def test_some_deprecated_method(...): ...STRING
LOWtests/test_cache_layout.py28 def test_file_downloaded_in_cache(self):CODE
LOWtests/test_cache_layout.py76 def test_no_exist_file_is_cached(self):CODE
LOWtests/test_cache_layout.py116 def test_file_download_happens_once(self):CODE
LOWtests/test_cache_layout.py130 def test_file_download_happens_once_intra_revision(self):CODE
LOWtests/test_cache_layout.py145 def test_multiple_refs_for_same_file(self):CODE
LOWtests/test_cache_layout.py179 def test_file_downloaded_in_cache(self):CODE
LOWtests/test_cache_layout.py210 def test_file_downloaded_in_cache_several_revisions(self):CODE
LOW⚡tests/test_cli_output.py69def test_auto_resolves_to_human():CODE
1913 more matches not shown…
Cross-File Repetition112 hits · 560 pts
SeverityFileLineSnippetContext
HIGHtests/test_cli_discussions.py0set hf_token and hf_endpoint for all cli tests in this module.STRING
HIGHtests/test_copy_files.py0set hf_token and hf_endpoint for all cli tests in this module.STRING
HIGHtests/test_buckets_cli.py0set hf_token and hf_endpoint for all cli tests in this module.STRING
HIGHdocs/source/de/guides/integrations.md0load pytorch pretrained weights and return the loaded model.STRING
HIGHdocs/source/en/guides/integrations.md0load pytorch pretrained weights and return the loaded model.STRING
HIGHsrc/huggingface_hub/hub_mixin.py0load pytorch pretrained weights and return the loaded model.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0whether to use sampling instead of greedy decoding when generating new tokens.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0whether to use sampling instead of greedy decoding when generating new tokens.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0whether to use sampling instead of greedy decoding when generating new tokens.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0whether to use sampling instead of greedy decoding when generating new tokens.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0controls the stopping condition for beam-based methods.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0controls the stopping condition for beam-based methods.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0controls the stopping condition for beam-based methods.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0controls the stopping condition for beam-based methods.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will beSTRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will beSTRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will beSTRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will beSTRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a tSTRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a tSTRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a tSTRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a tSTRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0the maximum length (in tokens) of the generated text, including the input.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0the maximum length (in tokens) of the generated text, including the input.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0the maximum length (in tokens) of the generated text, including the input.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0the maximum length (in tokens) of the generated text, including the input.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0the maximum number of tokens to generate. takes precedence over max_length.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0the maximum number of tokens to generate. takes precedence over max_length.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0the maximum number of tokens to generate. takes precedence over max_length.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0the maximum number of tokens to generate. takes precedence over max_length.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0the minimum length (in tokens) of the generated text, including the input.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0the minimum length (in tokens) of the generated text, including the input.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0the minimum length (in tokens) of the generated text, including the input.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0the minimum length (in tokens) of the generated text, including the input.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0the minimum number of tokens to generate. takes precedence over min_length.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0the minimum number of tokens to generate. takes precedence over min_length.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0the minimum number of tokens to generate. takes precedence over min_length.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0the minimum number of tokens to generate. takes precedence over min_length.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0number of groups to divide num_beams into in order to ensure diversity among different groups of beams. see [this paper]STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0number of groups to divide num_beams into in order to ensure diversity among different groups of beams. see [this paper]STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0number of groups to divide num_beams into in order to ensure diversity among different groups of beams. see [this paper]STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0number of groups to divide num_beams into in order to ensure diversity among different groups of beams. see [this paper]STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0the value balances the model confidence and the degeneration penalty in contrastive search decoding.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0the value balances the model confidence and the degeneration penalty in contrastive search decoding.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0the value balances the model confidence and the degeneration penalty in contrastive search decoding.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0the value balances the model confidence and the degeneration penalty in contrastive search decoding.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0the value used to modulate the next token probabilities.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0the value used to modulate the next token probabilities.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0the value used to modulate the next token probabilities.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0the value used to modulate the next token probabilities.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0the number of highest probability vocabulary tokens to keep for top-k-filtering.STRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0the number of highest probability vocabulary tokens to keep for top-k-filtering.STRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0the number of highest probability vocabulary tokens to keep for top-k-filtering.STRING
HIGH…face_hub/inference/_generated/types/text_generation.py0the number of highest probability vocabulary tokens to keep for top-k-filtering.STRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0the number of highest probability vocabulary tokens to keep for top-k-filtering.STRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher areSTRING
HIGH…ngface_hub/inference/_generated/types/image_to_text.py0if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher areSTRING
HIGH…gface_hub/inference/_generated/types/text_to_speech.py0if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher areSTRING
HIGH…rence/_generated/types/automatic_speech_recognition.py0if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher areSTRING
HIGH…ngface_hub/inference/_generated/types/text_to_audio.py0local typicality measures how similar the conditional probability of predicting a target token next is to the expected cSTRING
52 more matches not shown…
Docstring Block Structure123 hits · 520 pts
SeverityFileLineSnippetContext
HIGHutils/release_notes/generate_slack_message.py62Run the hf-release-notes:slack OpenCode skill. Args: version: Base version (e.g., "v1.7.0") input_fSTRING
HIGHsrc/huggingface_hub/lfs.py143 Requests the LFS batch endpoint to retrieve upload instructions Learn more: https://github.com/git-lfs/git-lfsSTRING
HIGHsrc/huggingface_hub/_buckets.py1031Sync files between a local directory and a bucket. This is equivalent to the ``hf buckets sync`` CLI command. One oSTRING
HIGHsrc/huggingface_hub/file_download.py878Download a given file if it's not already present in the local cache. The new cache file layout looks like this: STRING
HIGHsrc/huggingface_hub/_inference_endpoints.py265Wait for the Inference Endpoint to be deployed. Information from the server will be fetched every 1s. If the InSTRING
HIGHsrc/huggingface_hub/hf_api.py2023 Parse and validate safetensors metadata size from the first 8 bytes. This is a shared helper function used by STRING
HIGHsrc/huggingface_hub/hf_api.py2056 Parse safetensors metadata from raw header bytes. This is a shared helper function used by both remote and locSTRING
HIGHsrc/huggingface_hub/hf_api.py2969 List all public repos liked by a user on huggingface.co. This list is public so token is optional. If STRING
HIGHsrc/huggingface_hub/hf_api.py3530Resolve a revision (branch, tag, PR ref) to a commit hash. This is meant for libraries that download and load sSTRING
HIGHsrc/huggingface_hub/hf_api.py3659 Checks if a repository exists on the Hugging Face Hub. Args: repo_id (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py3704 Checks if a specific revision exists on a repo on the Hugging Face Hub. Args: repo_id (`stSTRING
HIGHsrc/huggingface_hub/hf_api.py3752 Checks if a file exists in a repository on the Hugging Face Hub. Args: repo_id (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py3852 List a repo tree's files and folders and get information about them. Args: repo_id (`str`)STRING
HIGHsrc/huggingface_hub/hf_api.py3983 Verify local files for a repo against Hub checksums. Args: repo_id (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py4130 Get the list of commits of a given revision for a repo on the Hub. Commits are sorted by date (last coSTRING
HIGHsrc/huggingface_hub/hf_api.py4217 Get information about a repo's paths. Args: repo_id (`str`): A namespace (STRING
HIGHsrc/huggingface_hub/hf_api.py4971 Creates a commit in the given repo, deleting & uploading files as needed. > [!WARNING] > The iSTRING
HIGHsrc/huggingface_hub/hf_api.py6311Download a given file if it's not already present in the local cache. The new cache file layout looks like thisSTRING
HIGHsrc/huggingface_hub/hf_api.py6494Download repo files. Download a whole snapshot of a repo's files at the specified revision. This is useful whenSTRING
HIGHsrc/huggingface_hub/hf_api.py6607 Parse metadata for a safetensors repo on the Hub. We first check if the repo has a single safetensors STRING
HIGHsrc/huggingface_hub/hf_api.py6762 Parse metadata from a safetensors file on the Hub. To parse metadata from all safetensors files in a rSTRING
HIGHsrc/huggingface_hub/hf_api.py7493Creates a new comment on the given Discussion. Args: repo_id (`str`): A namespace (STRING
HIGHsrc/huggingface_hub/hf_api.py7569Renames a Discussion. Args: repo_id (`str`): A namespace (user or an organization) STRING
HIGHsrc/huggingface_hub/hf_api.py7637Closes or re-opens a Discussion or Pull Request. Args: repo_id (`str`): A namespaceSTRING
HIGHsrc/huggingface_hub/hf_api.py8249Pause your Space. A paused Space stops executing until manually restarted by its owner. This is different from STRING
HIGHsrc/huggingface_hub/hf_api.py8288Enable dev mode on a Space. Spaces Dev Mode eases the debugging of your application and makes iterating on SpacSTRING
HIGHsrc/huggingface_hub/hf_api.py8332Disable dev mode on a Space. Spaces Dev Mode eases the debugging of your application and makes iterating on SpaSTRING
HIGHsrc/huggingface_hub/hf_api.py8374Restart your Space. This is the only way to programmatically restart a Space if you've put it on Pause (see [`pSTRING
HIGHsrc/huggingface_hub/hf_api.py8615Wait until a Space reaches a terminal stage (not building/starting). Polls [`get_space_runtime`] every `poll_inSTRING
HIGHsrc/huggingface_hub/hf_api.py8684Duplicate a repo on the Hub (model, dataset, or Space). This performs a server-side copy that preserves full giSTRING
HIGHsrc/huggingface_hub/hf_api.py10224Add an item to a collection on the Hub. Args: collection_slug (`str`): Slug of the STRING
HIGHsrc/huggingface_hub/hf_api.py10411 Get pending access requests for a given gated repo. A pending request means the user has requested accSTRING
HIGHsrc/huggingface_hub/hf_api.py10475 Get accepted access requests for a given gated repo. An accepted request means the user has requested STRING
HIGHsrc/huggingface_hub/hf_api.py10537 Get rejected access requests for a given gated repo. A rejected request means the user has requested aSTRING
HIGHsrc/huggingface_hub/hf_api.py11488 Get an overview of a user on the Hub. Args: username (`str`): Username of STRING
HIGHsrc/huggingface_hub/hf_api.py11515 Get an overview of an organization on the Hub. Args: organization (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11542 List followers of an organization on the Hub. Args: organization (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11570 List of members of an organization on the Hub. Args: organization (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11598 Get the list of followers of a user on the Hub. Args: username (`str`): UsSTRING
HIGHsrc/huggingface_hub/hf_api.py11626 Get the list of users followed by a user on the Hub. Args: username (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11705 Get information for a paper on the Hub. Args: id (`str`, **optional**): ArSTRING
HIGHsrc/huggingface_hub/hf_api.py11725 Get the markdown content of a paper page on the Hub. Args: id (`str`): ArXSTRING
HIGHsrc/huggingface_hub/hf_api.py12414 Wait until one or more compute Jobs on Hugging Face infrastructure reach a given stage. Each Job statuSTRING
HIGHsrc/huggingface_hub/hf_api.py13239 Trigger a scheduled Job to run immediately. This triggers one immediate run of the scheduled job's speSTRING
HIGHsrc/huggingface_hub/hf_api.py13831Get information about a specific bucket on the Hub. Args: bucket_id (`str`): The IDSTRING
HIGHsrc/huggingface_hub/hf_api.py15120 Parse metadata from a local safetensors file. For more details regarding the safetensors format, check out httSTRING
HIGHsrc/huggingface_hub/hf_api.py15172 Parse metadata for a local safetensors file or folder. Supports: - Single safetensors file (e.g., `model.sSTRING
HIGHsrc/huggingface_hub/_snapshot_download.py145Download repo files. Download a whole snapshot of a repo's files at the specified revision. This is useful when youSTRING
HIGHsrc/huggingface_hub/_snapshot_download.py612Return the cached tree listing of a repo at a given revision, without any network call. The tree listing is the setSTRING
HIGHsrc/huggingface_hub/hf_file_system.py283 Resolve a Hugging Face file system path into its components. Args: path (`str`): STRING
HIGHsrc/huggingface_hub/_commit_api.py804 Fetch information about the files to copy. For LFS files, we only need their metadata (file size and sha256) wSTRING
HIGHsrc/huggingface_hub/serialization/_dduf.py92 Read a DDUF file and return a dictionary of entries. Only the metadata is read, the data is not loaded in memoSTRING
HIGHsrc/huggingface_hub/serialization/_torch.py386 Load a checkpoint into a model, handling both sharded and non-sharded checkpoints. Args: model (`torchSTRING
HIGHsrc/huggingface_hub/serialization/_torch.py641 Loads a checkpoint file, handling both safetensors and pickle checkpoint formats. Args: checkpoint_filSTRING
HIGHsrc/huggingface_hub/utils/_hf_uris.py260Parse a Hugging Face Hub URI ('hf://...') or a Hugging Face web URL. A HF URI is a URI-like string identifying a loSTRING
HIGHsrc/huggingface_hub/utils/_hf_uris.py444Parse a HF mount specification ('hf://...:<MOUNT_PATH>[:ro|:rw]'). A mount specification is a HF URI followed by a STRING
HIGHsrc/huggingface_hub/utils/_paths.py74Filter repo objects based on an allowlist and a denylist. Input must be a list of paths (`str` or `Path`) or a listSTRING
HIGHsrc/huggingface_hub/utils/_xet.py114 Utilizes the information in the parsed metadata to request the Hub xet connection information. This includes thSTRING
HIGHsrc/huggingface_hub/utils/_xet.py141 Requests the xet connection info from the supplied URL. This includes the access token, expiration time, and enSTRING
HIGHsrc/huggingface_hub/utils/_oauth_device.py87Poll the token endpoint until the user authorizes the device. Args: device_info (`DeviceCodeInfo`): STRING
63 more matches not shown…
Decorative Section Separators160 hits · 498 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_cli_discussions.py82# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_discussions.py84# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_discussions.py140# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_discussions.py142# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_discussions.py210# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_discussions.py212# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py164# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py166# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py238# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py240# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py282# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py284# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py297# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py299# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py331# =============================================================================COMMENT
MEDIUMtests/test_cli_discussions.py333# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_output.py64# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_output.py66# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_output.py89# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_output.py91# =============================================================================COMMENT
MEDIUMtests/test_cli_output.py207# =============================================================================COMMENT
MEDIUMtests/test_cli_output.py209# =============================================================================COMMENT
MEDIUM⚡tests/test_cli_output.py114# =============================================================================STRING
MEDIUM⚡tests/test_cli_output.py116# =============================================================================STRING
MEDIUM⚡tests/test_cli_output.py381# =============================================================================STRING
MEDIUM⚡tests/test_cli_output.py383# =============================================================================STRING
MEDIUMtests/test_cli_output.py235# =============================================================================STRING
MEDIUMtests/test_cli_output.py237# =============================================================================STRING
MEDIUMtests/test_cli_output.py284# =============================================================================STRING
MEDIUMtests/test_cli_output.py286# =============================================================================STRING
MEDIUMtests/test_cli_output.py361# =============================================================================STRING
MEDIUMtests/test_cli_output.py363# =============================================================================STRING
MEDIUMtests/test_cli_output.py407# =============================================================================STRING
MEDIUMtests/test_cli_output.py409# =============================================================================STRING
MEDIUM⚡tests/test_copy_files.py131# =============================================================================COMMENT
MEDIUM⚡tests/test_copy_files.py133# =============================================================================COMMENT
MEDIUMtests/test_copy_files.py150# =============================================================================COMMENT
MEDIUMtests/test_copy_files.py152# =============================================================================COMMENT
MEDIUMtests/test_copy_files.py294# =============================================================================COMMENT
MEDIUMtests/test_copy_files.py296# =============================================================================COMMENT
MEDIUMtests/test_copy_files.py375# =============================================================================COMMENT
MEDIUMtests/test_copy_files.py377# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py208# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py210# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py231# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py233# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py465# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py467# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py570# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py572# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py819# =============================================================================COMMENT
MEDIUM⚡tests/test_buckets_cli.py821# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py95# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py97# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py163# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py165# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py183# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py185# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py482# =============================================================================COMMENT
MEDIUMtests/test_buckets_cli.py484# =============================================================================COMMENT
100 more matches not shown…
Unused Imports865 hits · 468 pts
SeverityFileLineSnippetContext
LOWtests/test_serialization.py41CODE
LOWsrc/huggingface_hub/_upload_pipeline.py38CODE
LOWsrc/huggingface_hub/_upload_pipeline.py61CODE
LOWsrc/huggingface_hub/__init__.py1271CODE
LOWsrc/huggingface_hub/__init__.py1271CODE
LOWsrc/huggingface_hub/__init__.py1271CODE
LOWsrc/huggingface_hub/__init__.py1271CODE
LOWsrc/huggingface_hub/__init__.py1271CODE
LOWsrc/huggingface_hub/__init__.py1271CODE
LOWsrc/huggingface_hub/__init__.py1271CODE
LOWsrc/huggingface_hub/__init__.py1280CODE
LOWsrc/huggingface_hub/__init__.py1280CODE
LOWsrc/huggingface_hub/__init__.py1280CODE
LOWsrc/huggingface_hub/__init__.py1280CODE
LOWsrc/huggingface_hub/__init__.py1286CODE
LOWsrc/huggingface_hub/__init__.py1287CODE
LOWsrc/huggingface_hub/__init__.py1287CODE
LOWsrc/huggingface_hub/__init__.py1287CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1302CODE
LOWsrc/huggingface_hub/__init__.py1314CODE
LOWsrc/huggingface_hub/__init__.py1314CODE
LOWsrc/huggingface_hub/__init__.py1314CODE
LOWsrc/huggingface_hub/__init__.py1314CODE
LOWsrc/huggingface_hub/__init__.py1314CODE
LOWsrc/huggingface_hub/__init__.py1314CODE
LOWsrc/huggingface_hub/__init__.py1322CODE
LOWsrc/huggingface_hub/__init__.py1322CODE
LOWsrc/huggingface_hub/__init__.py1322CODE
LOWsrc/huggingface_hub/__init__.py1322CODE
LOWsrc/huggingface_hub/__init__.py1322CODE
LOWsrc/huggingface_hub/__init__.py1329CODE
LOWsrc/huggingface_hub/__init__.py1330CODE
LOWsrc/huggingface_hub/__init__.py1330CODE
LOWsrc/huggingface_hub/__init__.py1330CODE
LOWsrc/huggingface_hub/__init__.py1330CODE
LOWsrc/huggingface_hub/__init__.py1336CODE
LOWsrc/huggingface_hub/__init__.py1336CODE
LOWsrc/huggingface_hub/__init__.py1340CODE
LOWsrc/huggingface_hub/__init__.py1340CODE
LOWsrc/huggingface_hub/__init__.py1340CODE
LOWsrc/huggingface_hub/__init__.py1340CODE
LOWsrc/huggingface_hub/__init__.py1340CODE
LOWsrc/huggingface_hub/__init__.py1340CODE
805 more matches not shown…
Empty Error Handlers50 hits · 248 pts
SeverityFileLineSnippetContext
HIGHtests/test_utils_http.py491except httpx2.HTTPError:CODE
HIGHtests/test_commit_scheduler.py23except AttributeError:CODE
HIGHsrc/huggingface_hub/_upload_pipeline.py556except Exception:CODE
HIGHsrc/huggingface_hub/_local_folder.py466except IndexError:CODE
HIGHsrc/huggingface_hub/_local_folder.py468except OSError: # TimeoutError, FileNotFoundError, PermissionError, etc.CODE
HIGHsrc/huggingface_hub/_local_folder.py472except OSError:CODE
HIGHsrc/huggingface_hub/_local_folder.py487except OSError:CODE
HIGHsrc/huggingface_hub/_local_folder.py424except FileNotFoundError:CODE
HIGHsrc/huggingface_hub/_buckets.py616except Exception:CODE
HIGHsrc/huggingface_hub/_buckets.py705except Exception:CODE
HIGHsrc/huggingface_hub/file_download.py663except OSError:CODE
HIGHsrc/huggingface_hub/file_download.py713except PermissionError:CODE
HIGHsrc/huggingface_hub/file_download.py779except OSError: # raise on anything: file does not exist or space disk cannot be checkedCODE
HIGHsrc/huggingface_hub/file_download.py1229except OSError:CODE
HIGHsrc/huggingface_hub/file_download.py2085except OSError:CODE
HIGHsrc/huggingface_hub/_sandbox.py751except httpx2.RequestError:CODE
HIGHsrc/huggingface_hub/_sandbox.py2071except Exception:CODE
HIGHsrc/huggingface_hub/_sandbox.py1705except Exception:CODE
HIGHsrc/huggingface_hub/_login.py140except FileNotFoundError:CODE
HIGHsrc/huggingface_hub/hf_api.py6909except HfHubHTTPError:CODE
HIGHsrc/huggingface_hub/serialization/_torch.py849except ImportError:CODE
HIGHsrc/huggingface_hub/serialization/_torch.py860except ImportError:CODE
HIGHsrc/huggingface_hub/serialization/_torch.py905except ImportError:CODE
HIGHsrc/huggingface_hub/serialization/_torch.py915except ImportError:CODE
HIGHsrc/huggingface_hub/serialization/_torch.py962except ImportError:CODE
HIGHsrc/huggingface_hub/serialization/_torch.py1070except ImportError:CODE
HIGHsrc/huggingface_hub/utils/_shared_blobs.py348except OSError:CODE
HIGHsrc/huggingface_hub/utils/_shared_blobs.py332except OSError:CODE
HIGHsrc/huggingface_hub/utils/_shared_blobs.py364except OSError:CODE
HIGHsrc/huggingface_hub/utils/_shared_blobs.py565except OSError:CODE
HIGHsrc/huggingface_hub/utils/_parsing.py63except ValueError:CODE
HIGHsrc/huggingface_hub/utils/_fixes.py67except Exception:CODE
HIGHsrc/huggingface_hub/utils/_fixes.py60except Exception:CODE
HIGHsrc/huggingface_hub/utils/_fixes.py122except OSError:CODE
HIGHsrc/huggingface_hub/utils/_xet.py297except Exception:CODE
HIGHsrc/huggingface_hub/utils/_runtime.py413except Exception:CODE
HIGHsrc/huggingface_hub/utils/_runtime.py408except Exception:CODE
HIGHsrc/huggingface_hub/utils/_runtime.py73except importlib.metadata.PackageNotFoundError:CODE
HIGHsrc/huggingface_hub/utils/_oauth_device.py122except (httpx2.HTTPError, ValueError):CODE
HIGHsrc/huggingface_hub/utils/_auth.py48except (OSError, NotImplementedError):CODE
HIGHsrc/huggingface_hub/utils/_cache_manager.py809except OSError:CODE
HIGHsrc/huggingface_hub/utils/_cache_manager.py326except OSError:CODE
HIGHsrc/huggingface_hub/cli/cache.py771except FileNotFoundError:CODE
HIGHsrc/huggingface_hub/cli/jobs.py2180except KeyboardInterrupt:CODE
HIGHsrc/huggingface_hub/cli/jobs.py2186except multiprocessing.TimeoutError:CODE
HIGHsrc/huggingface_hub/cli/extensions.py584except Exception:CODE
HIGHsrc/huggingface_hub/cli/extensions.py597except Exception:CODE
HIGHsrc/huggingface_hub/cli/extensions.py608except Exception:CODE
HIGHsrc/huggingface_hub/cli/extensions.py671except (OverflowError, OSError, ValueError):CODE
HIGHsrc/huggingface_hub/inference/_mcp/cli.py220except (AttributeError, NotImplementedError):CODE
Excessive Try-Catch Wrapping106 hits · 129 pts
SeverityFileLineSnippetContext
LOWtests/test_cache_layout.py314 except Exception:CODE
LOWtests/testing_utils.py83 except Exception as e:CODE
LOWtests/test_xet_utils.py165 except Exception:CODE
MEDIUMutils/check_all_variable.py83 print("Error: _SUBMOD_ATTRS dictionary not found in `./src/huggingface_hub/__init__.py`.")CODE
MEDIUMutils/check_hardware_flavors.py70 print(f"Error: could not find class {class_name} in source.")CODE
MEDIUMutils/check_hardware_flavors.py77 print(f"Error: could not find docstring end for class {class_name}.")CODE
MEDIUM⚡utils/check_hardware_flavors.py148 print(f"Error: could not find class {class_name}.")CODE
MEDIUMutils/check_hardware_flavors.py178 print(f"Error running `hf jobs hardware`:\n{result.stderr}")CODE
MEDIUMutils/check_hardware_flavors.py199 print(f"Error: could not find hardware table markers in {JOBS_GUIDE_PATH}.")CODE
MEDIUMutils/release_notes/generate_slack_message.py82 print("Error: 'opencode' command not found in PATH", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_slack_message.py99 print("Error: 'opencode' command not found", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_slack_message.py123 print(f"Error: {e}", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_slack_message.py130 print(f"Error: Release notes file not found for {version}", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_slack_message.py152 print(f"Error: OpenCode did not produce output at {body_file}", file=sys.stderr)CODE
LOWutils/release_notes/fetch_prs.py166 except Exception as e:CODE
MEDIUMutils/release_notes/validate_notes.py110 print(f"Error: {e}", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_release_notes.py112 print("Error: 'opencode' command not found in PATH", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_release_notes.py131 print("Error: 'opencode' command not found", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_release_notes.py156 print(f"Error: {e}", file=sys.stderr)CODE
MEDIUMutils/release_notes/generate_release_notes.py176 print(f"Error: {e}", file=sys.stderr)CODE
LOWsrc/huggingface_hub/repocard_data.py387 except Exception as e:CODE
LOWsrc/huggingface_hub/_dataset_viewer.py97 except Exception:CODE
LOWsrc/huggingface_hub/_upload_pipeline.py556 except Exception:CODE
LOWsrc/huggingface_hub/_upload_pipeline.py615 except Exception as e:CODE
LOWsrc/huggingface_hub/_commit_scheduler.py200 except Exception as e:CODE
MEDIUM⚡src/huggingface_hub/__init__.py1225 print(f"Error importing {package_name}.{name}: {e}")CODE
MEDIUM⚡src/huggingface_hub/__init__.py1232 print(f"Error importing {submod_path}: {e}")CODE
LOW⚡src/huggingface_hub/__init__.py1224 except Exception as e:CODE
LOW⚡src/huggingface_hub/__init__.py1231 except Exception as e:CODE
LOWsrc/huggingface_hub/_local_folder.py322 except Exception as e:CODE
LOWsrc/huggingface_hub/_local_folder.py329 except Exception as e:CODE
LOWsrc/huggingface_hub/_local_folder.py397 except Exception as e:CODE
LOWsrc/huggingface_hub/_local_folder.py404 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox_cache.py183 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox_cache.py237 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox_cache.py256 except Exception as e:CODE
LOWsrc/huggingface_hub/_buckets.py616 except Exception:CODE
LOWsrc/huggingface_hub/_buckets.py705 except Exception:CODE
MEDIUMsrc/huggingface_hub/_sandbox.py1795def __exit__(self, *exc_info) -> None:CODE
LOWsrc/huggingface_hub/_sandbox.py552 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py569 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py940 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py945 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py967 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py1018 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py1677 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py1698 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py1705 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py1771 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py1854 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py2035 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py2065 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py2071 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py2132 except Exception:CODE
LOWsrc/huggingface_hub/_sandbox.py2135 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py2283 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py2512 except Exception as e:CODE
LOWsrc/huggingface_hub/_sandbox.py2586 except Exception:CODE
LOWsrc/huggingface_hub/_login.py385 except Exception as error:CODE
LOWsrc/huggingface_hub/hf_file_system.py1365 except Exception:CODE
46 more matches not shown…
Over-Commented Block131 hits · 118 pts
SeverityFileLineSnippetContext
LOWtests/test_local_folder.py1# coding=utf-8COMMENT
LOWtests/test_cli_discussions.py1# coding=utf-8COMMENT
LOWtests/test_xet_upload.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_cache_layout.py241 k: [os.path.normpath(os.path.join(k, link)) for link in v] for k, v in links_in_snapshots.items()COMMENT
LOWtests/test_cli_output.py1# coding=utf-8COMMENT
LOWtests/test_hf_file_system.py401 def test_get_file_on_folder(self):COMMENT
LOWtests/test_inference_client.py1# Copyright 2023 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_copy_files.py1# coding=utf-8COMMENT
LOWtests/test_buckets_cli.py1# coding=utf-8COMMENT
LOWtests/test_hf_api.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_cli_framework.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_utils_detect_agent.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_oauth.py1# coding=utf-8COMMENT
LOWtests/test_tree_cache.py1# Copyright 2026-present, the HuggingFace Inc. team.COMMENT
LOWtests/test_inference_async_client.py1# coding=utf-8COMMENT
LOWtests/test_kernels.py1# coding=utf-8COMMENT
LOWtests/test_repocard.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_file_download.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_buckets.py1# coding=utf-8COMMENT
LOWtests/test_endpoint_helpers.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/test_cli.py4141# image = "vllm/vllm-openai:latest"COMMENT
LOWtests/test_utils_hf_uris.py1# Copyright 2026-present, the HuggingFace Inc. team.COMMENT
LOWutils/check_task_parameters.py1# coding=utf-8COMMENT
LOWutils/check_all_variable.py1# coding=utf-8COMMENT
LOWutils/generate_inference_types.py1# coding=utf-8COMMENT
LOWutils/push_repocard_examples.py1# coding=utf-8COMMENT
LOWutils/check_inference_input_params.py1# coding=utf-8COMMENT
LOWutils/generate_async_inference_client.py1# coding=utf-8COMMENT
LOWutils/check_hardware_flavors.py1# coding=utf-8COMMENT
LOWutils/check_static_imports.py1# coding=utf-8COMMENT
LOWutils/helpers.py1# coding=utf-8COMMENT
LOWutils/check_imports.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWutils/_legacy_check_future_compatible_signatures.py1# coding=utf-8COMMENT
LOWutils/_legacy_check_future_compatible_signatures.py41from huggingface_hub.hf_api import HfApiCOMMENT
LOWdocs/source/en/guides/cli.md2241# dependencies = ["vllm", "datasets"]COMMENT
LOW.github/workflows/release.yml1# Unified release workflow for huggingface_hub.COMMENT
LOW.github/workflows/release.yml21# For a patch release, cherry-pick fixes to the release branch first, then trigger a "patch-release" run. This incrementCOMMENT
LOW.github/workflows/release.yml41# - APP_SECRET_PEM_HUGGINGFACE_HUB_BOT : GitHub App private key for huggingface-hub-botCOMMENT
LOW.github/workflows/release.yml421 --arg thread_ts "${{ needs.prepare.outputs.message_ts }}" \COMMENT
LOW.github/workflows/release.yml741 --arg file_id "$FILE_ID" \COMMENT
LOW.github/workflows/close-unscoped-community-prs.yml1# Enforces the "open an issue first" policy from CONTRIBUTING.md for community contributions:COMMENT
LOWsrc/huggingface_hub/repocard_data.py61 # RequiredCOMMENT
LOWsrc/huggingface_hub/repocard_data.py81 metric_value: AnyCOMMENT
LOWsrc/huggingface_hub/_dataset_viewer.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWsrc/huggingface_hub/_webhooks_payload.py1# Copyright 2023-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/_upload_pipeline.py1# coding=utf-8COMMENT
LOWsrc/huggingface_hub/_webhooks_server.py1# Copyright 2023-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/_space_api.py1# Copyright 2019-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/_tree_cache.py1# Copyright 2026-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/__init__.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWsrc/huggingface_hub/__init__.py21# quickly without the hassle of importing all the features from `huggingface_hub`.COMMENT
LOWsrc/huggingface_hub/_local_folder.py1# Copyright 2024-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/lfs.py1# Copyright 2019-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/_sandbox_cache.py1# coding=utf-8COMMENT
LOWsrc/huggingface_hub/_buckets.py1# Copyright 2026-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/_sandbox.py1# coding=utf-8COMMENT
LOWsrc/huggingface_hub/_sandbox.py1461 # all find every host full boots one host at a time (each new host freesCOMMENT
LOWsrc/huggingface_hub/_login.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWsrc/huggingface_hub/hf_api.py1# Copyright 2019-present, the HuggingFace Inc. team.COMMENT
LOWsrc/huggingface_hub/_jobs_api.py1# Copyright 2025-present, the HuggingFace Inc. team.COMMENT
71 more matches not shown…
Self-Referential Comments36 hits · 92 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_xet_upload.py114 # Create a regular text fileCOMMENT
MEDIUM⚡tests/test_xet_upload.py119 # Create a binary fileCOMMENT
MEDIUM⚡tests/test_xet_upload.py128 # Create a nested text fileCOMMENT
MEDIUM⚡tests/test_xet_upload.py133 # Create a nested binary fileCOMMENT
MEDIUM⚡tests/test_hf_file_system.py926 # Create a new repoCOMMENT
MEDIUMtests/test_hf_api.py593 # Create a commit with a PRCOMMENT
MEDIUMtests/test_hf_api.py670 # Create a repo with another user. The normal CI user don't have rights on it.COMMENT
MEDIUMtests/test_hf_api.py734 # Creating a commit with a parent commit that is not the current main should failCOMMENT
MEDIUMtests/test_hf_api.py1458 # Create a PR with a readmeCOMMENT
MEDIUMtests/test_hf_api.py1483 # Create a PR with a readmeCOMMENT
MEDIUM⚡tests/test_hf_api.py3647 # Create a commit on `main` branchSTRING
MEDIUM⚡tests/test_hf_api.py3650 # Create a commit in a PRSTRING
MEDIUMtests/test_hf_api.py3195 # Create a SpaceSTRING
MEDIUMtests/test_hf_api.py4267 # Create a webhook to be used in the testsSTRING
MEDIUMtests/test_utils_strict_dataclass.py572 # Create a sample scriptCOMMENT
MEDIUMtests/test_utils_strict_dataclass.py593 # Create a sample scriptSTRING
MEDIUMtests/test_utils_strict_dataclass.py615 # Create a sample scriptSTRING
MEDIUMtests/test_utils_strict_dataclass.py635 # Create a sample scriptSTRING
MEDIUMtests/test_file_download.py1137 # Create a mock response objectCOMMENT
MEDIUMtests/test_file_download.py1224 # Create a mock response objectCOMMENT
MEDIUMtests/test_inference_endpoints.py409 # Create an iterator that yields three MOCK_UPDATE responses,and then infinitely yields MOCK_RUNNING responses.COMMENT
MEDIUMutils/check_task_parameters.py309 # Create a new parameter with the provided type and a default value of NoneCOMMENT
MEDIUMutils/check_task_parameters.py399 # Create the parameter line with type and optionalityCOMMENT
MEDIUMutils/generate_inference_types.py71# This file is auto-generated by `utils/generate_inference_types.py`.COMMENT
MEDIUMsrc/huggingface_hub/repocard_data.py583 >>> # Define a minimal model indexSTRING
MEDIUMsrc/huggingface_hub/_dataset_viewer.py91 # Create a new connection (Python API).COMMENT
MEDIUMsrc/huggingface_hub/_webhooks_payload.py24 # Define a dummy BaseModel to avoid import errors when pydantic is not installedCOMMENT
MEDIUMsrc/huggingface_hub/_local_folder.py67 "# This file is a cache directory tag created by huggingface_hub.\n"CODE
MEDIUMsrc/huggingface_hub/_local_folder.py455 # Create a CACHEDIR.TAG so backup tools can skip this directory.COMMENT
MEDIUMsrc/huggingface_hub/_oauth.py139 # Create a FastAPI appSTRING
MEDIUMsrc/huggingface_hub/hf_api.py4171 # Create an empty branch by deriving from initial commitSTRING
MEDIUMsrc/huggingface_hub/dataclasses.py194 # Define a default __post_init__ if not definedCOMMENT
MEDIUMsrc/huggingface_hub/dataclasses.py363 # Create a strict dataclass from the TypedDict fieldsCOMMENT
MEDIUM⚡src/huggingface_hub/utils/_shared_blobs.py320 # Create the lock file ourselves: `O_NOFOLLOW` refuses a planted symlink and 0o666 lets other users of aCOMMENT
MEDIUMsrc/huggingface_hub/inference/_mcp/mcp_client.py276 # Create the streaming requestCOMMENT
MEDIUM…huggingface_hub/inference/_generated/types/__init__.py1# This file is auto-generated by `utils/generate_inference_types.py`.COMMENT
Deep Nesting97 hits · 80 pts
SeverityFileLineSnippetContext
LOWtests/testing_utils.py54CODE
LOWtests/test_snapshot_download.py236CODE
LOWtests/test_snapshot_download.py247CODE
LOWtests/test_snapshot_download.py259CODE
LOWtests/test_snapshot_download.py271CODE
LOWtests/test_xet_download.py230CODE
LOWtests/test_sandbox.py204CODE
LOWtests/test_sandbox.py265CODE
LOWtests/test_utils_fixes.py33CODE
LOWtests/test_utils_tqdm.py113CODE
LOWutils/check_task_parameters.py701CODE
LOWutils/check_task_parameters.py106CODE
LOWutils/check_task_parameters.py132CODE
LOWutils/check_task_parameters.py418CODE
LOWutils/generate_cli_reference.py80CODE
LOWutils/check_hardware_flavors.py100CODE
LOWsrc/huggingface_hub/hub_mixin.py453CODE
LOWsrc/huggingface_hub/_upload_pipeline.py92CODE
LOWsrc/huggingface_hub/_upload_pipeline.py255CODE
LOWsrc/huggingface_hub/_upload_pipeline.py480CODE
LOWsrc/huggingface_hub/_local_folder.py296CODE
LOWsrc/huggingface_hub/_local_folder.py347CODE
LOWsrc/huggingface_hub/_buckets.py383CODE
LOWsrc/huggingface_hub/_buckets.py449CODE
LOWsrc/huggingface_hub/_buckets.py562CODE
LOWsrc/huggingface_hub/_buckets.py892CODE
LOWsrc/huggingface_hub/file_download.py92CODE
LOWsrc/huggingface_hub/file_download.py334CODE
LOWsrc/huggingface_hub/file_download.py1068CODE
LOWsrc/huggingface_hub/file_download.py1313CODE
LOWsrc/huggingface_hub/file_download.py1692CODE
LOWsrc/huggingface_hub/file_download.py1968CODE
LOWsrc/huggingface_hub/file_download.py2097CODE
LOWsrc/huggingface_hub/_sandbox.py1075CODE
LOWsrc/huggingface_hub/_sandbox.py1633CODE
LOWsrc/huggingface_hub/_sandbox.py1807CODE
LOWsrc/huggingface_hub/_sandbox.py2248CODE
LOWsrc/huggingface_hub/hf_api.py2234CODE
LOWsrc/huggingface_hub/hf_api.py2477CODE
LOWsrc/huggingface_hub/hf_api.py4514CODE
LOWsrc/huggingface_hub/hf_api.py5240CODE
LOWsrc/huggingface_hub/hf_api.py6834CODE
LOWsrc/huggingface_hub/hf_api.py8416CODE
LOWsrc/huggingface_hub/hf_api.py8950CODE
LOWsrc/huggingface_hub/hf_api.py13498CODE
LOWsrc/huggingface_hub/hf_api.py13717CODE
LOWsrc/huggingface_hub/hf_api.py14253CODE
LOWsrc/huggingface_hub/hf_api.py14415CODE
LOWsrc/huggingface_hub/hf_api.py14620CODE
LOWsrc/huggingface_hub/hf_api.py14836CODE
LOWsrc/huggingface_hub/dataclasses.py56CODE
LOWsrc/huggingface_hub/dataclasses.py337CODE
LOWsrc/huggingface_hub/dataclasses.py460CODE
LOWsrc/huggingface_hub/dataclasses.py561CODE
LOWsrc/huggingface_hub/dataclasses.py112CODE
LOWsrc/huggingface_hub/dataclasses.py158CODE
LOWsrc/huggingface_hub/_snapshot_download.py123CODE
LOWsrc/huggingface_hub/repocard.py528CODE
LOWsrc/huggingface_hub/repocard.py689CODE
LOWsrc/huggingface_hub/hf_file_system.py528CODE
37 more matches not shown…
AI Structural Patterns111 hits · 72 pts
SeverityFileLineSnippetContext
LOWsrc/huggingface_hub/repocard_data.py335CODE
LOWsrc/huggingface_hub/repocard_data.py440CODE
LOWsrc/huggingface_hub/repocard_data.py530CODE
LOWsrc/huggingface_hub/hub_mixin.py185CODE
LOWsrc/huggingface_hub/hub_mixin.py610CODE
LOWsrc/huggingface_hub/_commit_scheduler.py101CODE
LOWsrc/huggingface_hub/_buckets.py1011CODE
LOWsrc/huggingface_hub/file_download.py784CODE
LOWsrc/huggingface_hub/file_download.py808CODE
LOWsrc/huggingface_hub/file_download.py832CODE
LOWsrc/huggingface_hub/file_download.py857CODE
LOWsrc/huggingface_hub/file_download.py1617CODE
LOWsrc/huggingface_hub/_sandbox.py836CODE
LOWsrc/huggingface_hub/_sandbox.py1048CODE
LOWsrc/huggingface_hub/_sandbox.py1075CODE
LOWsrc/huggingface_hub/_sandbox.py1358CODE
LOWsrc/huggingface_hub/_inference_endpoints.py328CODE
LOWsrc/huggingface_hub/hf_api.py2285CODE
LOWsrc/huggingface_hub/hf_api.py2477CODE
LOWsrc/huggingface_hub/hf_api.py2749CODE
LOWsrc/huggingface_hub/hf_api.py4514CODE
LOWsrc/huggingface_hub/hf_api.py4918CODE
LOWsrc/huggingface_hub/hf_api.py4936CODE
LOWsrc/huggingface_hub/hf_api.py4955CODE
LOWsrc/huggingface_hub/hf_api.py5515CODE
LOWsrc/huggingface_hub/hf_api.py5533CODE
LOWsrc/huggingface_hub/hf_api.py5552CODE
LOWsrc/huggingface_hub/hf_api.py5698CODE
LOWsrc/huggingface_hub/hf_api.py5718CODE
LOWsrc/huggingface_hub/hf_api.py5739CODE
LOWsrc/huggingface_hub/hf_api.py6256CODE
LOWsrc/huggingface_hub/hf_api.py6275CODE
LOWsrc/huggingface_hub/hf_api.py6294CODE
LOWsrc/huggingface_hub/hf_api.py6436CODE
LOWsrc/huggingface_hub/hf_api.py6456CODE
LOWsrc/huggingface_hub/hf_api.py6476CODE
LOWsrc/huggingface_hub/hf_api.py8667CODE
LOWsrc/huggingface_hub/hf_api.py9008CODE
LOWsrc/huggingface_hub/hf_api.py9509CODE
LOWsrc/huggingface_hub/hf_api.py11744CODE
LOWsrc/huggingface_hub/hf_api.py11888CODE
LOWsrc/huggingface_hub/hf_api.py12638CODE
LOWsrc/huggingface_hub/hf_api.py12838CODE
LOWsrc/huggingface_hub/hf_api.py13318CODE
LOWsrc/huggingface_hub/hf_api.py14974CODE
LOWsrc/huggingface_hub/_snapshot_download.py47CODE
LOWsrc/huggingface_hub/_snapshot_download.py72CODE
LOWsrc/huggingface_hub/_snapshot_download.py97CODE
LOWsrc/huggingface_hub/_snapshot_download.py123CODE
LOWsrc/huggingface_hub/repocard.py689CODE
LOWsrc/huggingface_hub/_jobs_api.py635CODE
LOWsrc/huggingface_hub/_tensorboard_logger.py114CODE
LOWsrc/huggingface_hub/fastai_utils.py335CODE
LOWsrc/huggingface_hub/utils/_lfs.py89CODE
LOWsrc/huggingface_hub/cli/models.py80CODE
LOWsrc/huggingface_hub/cli/upload.py53CODE
LOWsrc/huggingface_hub/cli/_framework.py563CODE
LOWsrc/huggingface_hub/cli/download.py40CODE
LOWsrc/huggingface_hub/cli/datasets.py72CODE
LOWsrc/huggingface_hub/cli/spaces.py109CODE
51 more matches not shown…
Cross-Language Confusion10 hits · 66 pts
SeverityFileLineSnippetContext
HIGH⚡tests/test_cli_output.py106 {"user": "Wauplin", "orgs": "org1,org2", "email": null}CODE
HIGH⚡tests/test_inference_client.py1003 'data: {"index":1,"token":{"id":4560,"text":" trying","logprob":-2.078125,"special":false},"generated_text":nullCODE
HIGH⚡tests/test_inference_client.py1006 'data: {"index":2,"token":{"id":311,"text":" to","logprob":-0.026245117,"special":false},"generated_text":" tryiCODE
HIGH⚡tests/test_inference_client.py1009 'data: {"index":2,"token":{"id":311,"text":" to","logprob":-0.026245117,"special":false},"generated_text":" tryiCODE
HIGH⚡tests/test_inference_client.py1026 'data: {"object":"chat.completion.chunk","id":"","created":1721737661,"model":"","system_fingerprint":"2.1.2-devCODE
HIGH⚡tests/test_inference_client.py1029 'data: {"object":"chat.completion.chunk","id":"","created":1721737661,"model":"","system_fingerprint":"2.1.2-devCODE
HIGH⚡tests/test_inference_client.py1032 'data: {"index":2,"token":{"id":311,"text":" to","logprob":-0.026245117,"special":false},"generated_text":" tryiCODE
HIGH⚡tests/test_inference_client.py1046 'data: {"object":"chat.completion.chunk","id":"","created":1721737661,"model":"","system_fingerprint":"2.1.2-devCODE
HIGHtests/test_repocard_data.py180 """model-index YAML may have 'source: null' (explicit null, which is valid YAML).STRING
HIGH⚡tests/test_hf_api.py4889 """The API returns registry credentials redacted (`{"username": "", "password": null}`), so echoing theSTRING
Redundant / Tautological Comments33 hits · 51 pts
SeverityFileLineSnippetContext
LOWtests/test_hf_api.py786 # Set repo to track png files as LFSCOMMENT
LOW⚡utils/check_task_parameters.py112 # Check if the statement is a simple statement (like a variable declaration)COMMENT
LOW⚡utils/check_task_parameters.py115 # Check if it's an annotated assignment (typical for dataclass fields)COMMENT
LOW⚡utils/check_task_parameters.py120 # Check if there's a default valueCOMMENT
LOWutils/check_task_parameters.py138 # Check if the next statement is a simple statement (like a string)COMMENT
LOWutils/check_task_parameters.py142 # Check if the statement is a string expression (potential docstring)COMMENT
LOWutils/check_task_parameters.py322 # Check if the first statement is a docstringCOMMENT
LOWutils/check_task_parameters.py441 # Check if the line is a parameter lineCOMMENT
LOWutils/generate_inference_types.py260 # Check if this is a field (AnnAssign)COMMENT
LOWutils/check_hardware_flavors.py239 # Check if the hardware table in the docs needs updating.COMMENT
LOWutils/release_notes/generate_release_notes.py109 # Check if opencode is availableCOMMENT
LOWutils/installers/install.sh176# Check if command existsCOMMENT
LOWutils/installers/install.sh318 # Check if uv is available and use it for faster installationCOMMENT
LOWutils/installers/install.sh350# Check if transformers is installed in the venv (using importlib.metadata for speed)COMMENT
LOW.github/workflows/release.yml1248 # Check if huggingface-hub-bot already commented on this PRCOMMENT
LOW.github/workflows/release.yml1324 # Check if any job failed or was cancelled (including prepare itself,COMMENT
LOWsrc/huggingface_hub/hub_mixin.py527 # Check if `config` argument was passed at initCOMMENT
LOW⚡src/huggingface_hub/file_download.py1599 # Check if file is cached as "no_exist"COMMENT
LOW⚡src/huggingface_hub/file_download.py1603 # Check if revision folder existsCOMMENT
LOW⚡src/huggingface_hub/file_download.py1611 # Check if file exists in cacheCOMMENT
LOWsrc/huggingface_hub/_login.py149 # Check if still logged inCOMMENT
LOWsrc/huggingface_hub/hf_api.py5334 # Check if a `gitignore` file is being committed to the Hub.COMMENT
LOWsrc/huggingface_hub/hf_file_system.py575 # Check if there are directories in repos with non-expanded entriesCOMMENT
LOWsrc/huggingface_hub/hf_file_system.py965 # Check if the path is in the cacheCOMMENT
LOWsrc/huggingface_hub/hf_file_system.py1194 # Close file only if we opened it ourselvesCOMMENT
LOWsrc/huggingface_hub/serialization/_torch.py698 # Check if file exists and is a regular file (not a directory)COMMENT
LOWsrc/huggingface_hub/utils/_terminal.py177 # Read the file descriptor directly: `sys.stdin.read(1)` would buffer the whole escapeCOMMENT
LOWsrc/huggingface_hub/utils/tqdm.py66 # Check if enabling a subgroup affects the parent groupSTRING
LOWsrc/huggingface_hub/cli/upload.py225 # Check if branch already exists and if not, create itCOMMENT
LOWsrc/huggingface_hub/inference/_mcp/cli.py84 # Check if the input is used by any server or as an apiKeyCOMMENT
LOWsrc/huggingface_hub/inference/_mcp/cli.py162 # Check if we should exitCOMMENT
LOWsrc/huggingface_hub/inference/_mcp/mcp_client.py238 # Add tool to the list of available tools (for use in chat completions)COMMENT
LOWsrc/huggingface_hub/inference/_mcp/mcp_client.py378 # Check if this is an exit loop toolCOMMENT
Modern Structural Boilerplate37 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/test_hf_api.py2674 def _setup(self, tmp_path, mocker) -> None:CODE
LOW⚡tests/test_xet_progress_reporting.py33 def set_postfix_str(self, postfix: str, refresh: bool = False) -> None:CODE
LOW⚡tests/test_repocard.py483 def _setup(self) -> None:STRING
LOWtests/test_repocard.py191 def _setup(self, tmp_path) -> None:STRING
LOW⚡tests/test_commit_scheduler.py182 def _setup(self, tmp_path) -> None:CODE
LOW⚡tests/test_utils_errors.py130 def _setup(self) -> None:CODE
LOWsrc/huggingface_hub/_upload_pipeline.py266 def _update_speed(self) -> None:CODE
LOWsrc/huggingface_hub/_commit_scheduler.py17logger = logging.getLogger(__name__)CODE
LOWsrc/huggingface_hub/__init__.py650__all__ = [CODE
LOWsrc/huggingface_hub/_local_folder.py63logger = logging.getLogger(__name__)CODE
LOWsrc/huggingface_hub/_oauth.py16logger = logging.getLogger(__name__)CODE
LOWsrc/huggingface_hub/_login.py544def _set_store_as_git_credential_helper_globally() -> None:CODE
LOWsrc/huggingface_hub/dataclasses.py688__all__ = [CODE
LOW⚡src/huggingface_hub/_snapshot_download.py506 def update_transfer(self, n: int | float | None = 1) -> None:CODE
LOW⚡src/huggingface_hub/_snapshot_download.py509 def set_postfix_str(self, postfix: str, refresh: bool = False) -> None:CODE
LOW⚡src/huggingface_hub/_snapshot_download.py513 def set_transfer_postfix_str(self, postfix: str, refresh: bool = False) -> None:CODE
LOWsrc/huggingface_hub/_hot_reload/sse_client.py19__all__ = ['SSEClient']CODE
LOWsrc/huggingface_hub/serialization/_dduf.py16logger = logging.getLogger(__name__)CODE
LOWsrc/huggingface_hub/utils/_terminal.py74 def set_enabled(cls, enabled: bool) -> None:CODE
LOWsrc/huggingface_hub/utils/logging.py122def set_verbosity(verbosity: int) -> None:CODE
LOWsrc/huggingface_hub/utils/_http.py372def set_client_factory(client_factory: CLIENT_FACTORY_T) -> None:CODE
LOWsrc/huggingface_hub/utils/_http.py389def set_async_client_factory(async_client_factory: ASYNC_CLIENT_FACTORY_T) -> None:CODE
LOWsrc/huggingface_hub/utils/_xet_progress_reporting.py21def _set_monotonic_total(bar, total: int | None) -> None:CODE
LOWsrc/huggingface_hub/utils/_xet_progress_reporting.py27def _update_transfer_bar(bar, inc: int) -> None:CODE
LOWsrc/huggingface_hub/utils/_xet_progress_reporting.py53def _set_aggregate_rate_postfix(bar) -> None:CODE
LOWsrc/huggingface_hub/utils/_xet_progress_reporting.py137 def update_progress(self, group_report, _item_reports: dict | None = None) -> None:CODE
LOWsrc/huggingface_hub/utils/_auth.py57logger = logging.getLogger(__name__)CODE
LOWsrc/huggingface_hub/utils/_git_credential.py55def set_git_credential(token: str, username: str = "hf_user", folder: str | None = None) -> None:STRING
LOWsrc/huggingface_hub/cli/_output.py65 def set_mode(self, mode: OutputFormat = OutputFormat.auto) -> None:CODE
LOWsrc/huggingface_hub/cli/_output.py78 def set_no_truncate(self, no_truncate: bool) -> None:CODE
LOWsrc/huggingface_hub/cli/_cli_utils.py41logger = logging.getLogger(__name__)CODE
LOWsrc/huggingface_hub/cli/_cli_utils.py409def set_output_format(format: OutputFormat | None, json: bool, quiet: bool) -> None:CODE
LOWsrc/huggingface_hub/inference/_common.py53logger = logging.getLogger(__name__)CODE
LOW⚡src/huggingface_hub/inference/_common.py379def _set_unsupported_text_generation_kwargs(model: str | None, unsupported_kwargs: list[str]) -> None:CODE
LOWsrc/huggingface_hub/inference/_client.py116logger = logging.getLogger(__name__)CODE
LOWsrc/huggingface_hub/inference/_mcp/mcp_client.py25logger = logging.getLogger(__name__)CODE
LOW…/huggingface_hub/inference/_generated/_async_client.py106logger = logging.getLogger(__name__)CODE
Synthetic Comment Markers5 hits · 32 pts
SeverityFileLineSnippetContext
HIGHtests/test_utils_dotenv.py1# AI-generated module (ChatGPT)COMMENT
HIGHutils/generate_cli_reference.py83 Auto-generated code by Cursor.STRING
HIGH.github/workflows/release.yml10# draft GitHub release with AI-generated notes, and opens test branches in downstream repositories (transformers,COMMENT
HIGH.github/workflows/release.yml534 # Archive the RAW AI-generated notes to the bucket now, before they are manuallyCOMMENT
HIGHsrc/huggingface_hub/utils/_dotenv.py1# AI-generated module (ChatGPT)COMMENT
AI Slop Vocabulary14 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_hf_file_system.py739 # Copy the result to make it robust to the cache modificationsCOMMENT
MEDIUMsrc/huggingface_hub/hf_file_system.py242 # make fs_token robust to default values and to kwargs orderCOMMENT
MEDIUMsrc/huggingface_hub/utils/tqdm.py101# Essentially, the environment variable's setting overrides any code-based configurations.COMMENT
LOWsrc/huggingface_hub/utils/_xet_progress_reporting.py257 # Here we just use the defaults.COMMENT
MEDIUMsrc/huggingface_hub/utils/_detect_agent.py30More details: https://huggingface.co/docs/hub/agents-overview#register-your-agent-harnessSTRING
MEDIUMsrc/huggingface_hub/utils/_detect_agent.py93 # No harness matched but a standard var is set => unrecognized agent.COMMENT
MEDIUM…ngface_hub/inference/_generated/types/text_to_audio.py46 """Number of groups to divide num_beams into in order to ensure diversity among differentSTRING
MEDIUM…hub/inference/_generated/types/image_classification.py19 """The function to apply to the model outputs in order to retrieve the scores."""STRING
MEDIUM…ngface_hub/inference/_generated/types/image_to_text.py46 """Number of groups to divide num_beams into in order to ensure diversity among differentSTRING
MEDIUM…hub/inference/_generated/types/audio_classification.py19 """The function to apply to the model outputs in order to retrieve the scores."""STRING
MEDIUM…hub/inference/_generated/types/video_classification.py21 """The function to apply to the model outputs in order to retrieve the scores."""STRING
MEDIUM…gface_hub/inference/_generated/types/text_to_speech.py46 """Number of groups to divide num_beams into in order to ensure diversity among differentSTRING
MEDIUM…_hub/inference/_generated/types/text_classification.py19 """The function to apply to the model outputs in order to retrieve the scores."""STRING
MEDIUM…rence/_generated/types/automatic_speech_recognition.py46 """Number of groups to divide num_beams into in order to ensure diversity among differentSTRING
Structural Annotation Overuse10 hits · 22 pts
SeverityFileLineSnippetContext
LOW⚡utils/check_hardware_flavors.py144 # Step 1: find the enum class and its docstring.COMMENT
LOW⚡utils/check_hardware_flavors.py157 # Step 2: find where the enum body ends (next top-level class/def/decorator).COMMENT
LOW⚡docs/source/en/guides/buckets.md712# Step 1: Generate a plan file (nothing is transferred)COMMENT
LOW⚡docs/source/en/guides/buckets.md721# Step 2: Review the plan file (JSONL format)COMMENT
LOW⚡docs/source/en/guides/buckets.md724# Step 3: Apply the planCOMMENT
LOW⚡docs/source/en/guides/buckets.md731# Step 1: Generate a plan file (nothing is transferred)COMMENT
LOW⚡docs/source/en/guides/buckets.md734# Step 2: Review the plan file (JSONL format), then applyCOMMENT
LOW⚡src/huggingface_hub/serialization/_dduf.py368 # Step 1: Get the local file header offsetCOMMENT
LOW⚡src/huggingface_hub/serialization/_dduf.py371 # Step 2: Read the local file headerCOMMENT
LOW⚡src/huggingface_hub/serialization/_dduf.py378 # Step 3: Parse the header fields to calculate the start of file dataCOMMENT
Verbosity Indicators6 hits · 13 pts
SeverityFileLineSnippetContext
LOW⚡utils/check_hardware_flavors.py144 # Step 1: find the enum class and its docstring.COMMENT
LOW⚡utils/check_hardware_flavors.py157 # Step 2: find where the enum body ends (next top-level class/def/decorator).COMMENT
LOW⚡src/huggingface_hub/serialization/_dduf.py368 # Step 1: Get the local file header offsetCOMMENT
LOW⚡src/huggingface_hub/serialization/_dduf.py371 # Step 2: Read the local file headerCOMMENT
LOW⚡src/huggingface_hub/serialization/_dduf.py378 # Step 3: Parse the header fields to calculate the start of file dataCOMMENT
LOWsrc/huggingface_hub/serialization/_torch.py940 # We need to check if `xla_device` can be found, will raise a RuntimeError if notCOMMENT
Slop Phrases8 hits · 12 pts
SeverityFileLineSnippetContext
LOWsetup.py82# Please make sure to update the list there when adding a new typing dependency.COMMENT
LOW.github/workflows/python-tests.yml158 # Please make sure to keep it updated as well.COMMENT
LOWsrc/huggingface_hub/__init__.py29# mandatory to make sure to add them twice when adding one. This is checked in theCOMMENT
LOWsrc/huggingface_hub/_local_folder.py246 # make sure to have a cross-platform transcriptionCOMMENT
LOWsrc/huggingface_hub/_local_folder.py278 # make sure to have a cross-platform transcriptionCOMMENT
LOWsrc/huggingface_hub/fastai_utils.py182Greetings fellow fastlearner 🤝! Don't forget to delete this content from your model card.CODE
LOWsrc/huggingface_hub/cli/spaces.py394 print("PS: Dev mode stops after 48h of inactivity, don't forget to save your changes regularly.")CODE
MEDIUMsrc/huggingface_hub/inference/_providers/_common.py16# for a given Inference Provider, you can add it to the following dictionary.COMMENT
Fake / Example Data9 hits · 6 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_hf_api.py3797 url = RepoUrl("https://huggingface.co/dummy_user/dummy_model")STRING
LOW⚡tests/test_hf_api.py3798 assert url.namespace == "dummy_user"STRING
LOW⚡tests/test_hf_api.py3800 assert url.repo_id == "dummy_user/dummy_model"STRING
LOWtests/test_hf_api.py3444 self.api = HfApi(token="fake_token")STRING
LOW⚡tests/test_cli.py2057 patch("huggingface_hub.cli.auth.get_token", return_value="fake-token"),CODE
LOW⚡tests/test_cli.py2068 patch("huggingface_hub.cli.auth.get_token", return_value="fake-token"),CODE
LOWtests/test_cli.py2046 patch("huggingface_hub.cli.auth.get_token", return_value="fake-token"),CODE
LOWsrc/huggingface_hub/hf_api.py530 >>> RepoUrl('https://hub-ci.huggingface.co/datasets/dummy_user/dummy_dataset', endpoint='https://hub-ci.huggingface.CODE
LOWsrc/huggingface_hub/hf_api.py531 RepoUrl('https://hub-ci.huggingface.co/datasets/dummy_user/dummy_dataset', endpoint='https://hub-ci.huggingface.co',CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/huggingface_hub/utils/insecure_hashlib.py14# Usage:COMMENT
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWsrc/huggingface_hub/utils/_experimental.py44 ... def my_function():STRING