AI Slop Code Risk Monitor

huggingface/huggingface_hub

SlopCodeMonitor badge for huggingface/huggingface_hub Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).
28.5 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for huggingface/huggingface_hub. SynthScan examined 168,579 lines of code across 489 source files, recording 3964 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
—
Last Push
—
Stars
—
Language
168.6K
Lines of Code
489
Files
4.0K
Pattern Hits
2026-10-31
Scan Date
0.62
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 56.2/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 14.8/100 · LOW

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

Agent Over-Engineering Ratio 62.3/100 · HIGH

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

PR Review Velocity Impact 82.8/100 · CRITICAL

Which changes need focused human review? 3964 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

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

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 302MEDIUM 230LOW 3432

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 3964 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 Identifiers2024 hits · 1737 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
LOW⚡tests/test_bucket_live_follow.py110 def test_events_split_at_arbitrary_byte_offsets(self):CODE
LOW⚡tests/test_bucket_live_follow.py115 def test_keep_alive_comments_and_crlf(self):CODE
LOW⚡tests/test_bucket_live_follow.py119 def test_several_events_in_a_single_chunk(self):CODE
LOW⚡tests/test_bucket_live_follow.py125 def test_stops_passing_chunks_once_stopped(self):CODE
LOW⚡tests/test_bucket_live_follow.py138 def test_exponential_and_capped(self):CODE
LOW⚡tests/test_bucket_live_follow.py142 def test_reset_after_a_healthy_session(self):CODE
LOW⚡tests/test_bucket_live_follow.py152 def test_retry_after_absent_or_invalid(self):CODE
LOW⚡tests/test_bucket_live_follow.py248 def test_reconnect_resumes_from_the_cursor_it_gives(self, follower_factory):CODE
LOW⚡tests/test_bucket_live_follow.py258 def test_stops_when_the_feed_is_not_served(self, follower_factory):CODE
LOW⚡tests/test_bucket_live_follow.py264 def test_gives_up_when_sessions_never_get_ready(self, follower_factory):CODE
LOW⚡tests/test_bucket_live_follow.py269 def test_a_healthy_session_resets_the_failure_counter(self, follower_factory):CODE
LOW⚡tests/test_bucket_live_follow.py274 def test_bad_request_steps_the_resume_point_back(self, follower_factory):CODE
LOW⚡tests/test_bucket_live_follow.py367 def test_add_invalidates_parent_directories_up_to_the_root(self, hffs):CODE
LOW⚡tests/test_bucket_live_follow.py375 def test_delete_invalidates_the_whole_chain(self, hffs):CODE
LOW⚡tests/test_bucket_live_follow.py380 def test_a_directory_change_also_drops_its_subtree(self, hffs):CODE
LOW⚡tests/test_bucket_live_follow.py386 def test_change_on_an_unlisted_path_only_touches_its_parents(self, hffs):CODE
LOW⚡tests/test_bucket_live_follow.py395 def test_invalidate_bucket_tree_drops_every_listing(self, hffs):CODE
LOWtests/test_bucket_live_follow.py40 def test_ready_without_payload(self):CODE
LOWtests/test_bucket_live_follow.py64 def test_changes_with_sparse_fields(self):CODE
LOWtests/test_bucket_live_follow.py76 def test_changes_without_cursor_or_changes_is_ignored(self):CODE
LOWtests/test_bucket_live_follow.py81 def test_changes_skips_items_with_unknown_op(self):CODE
LOWtests/test_bucket_live_follow.py92 def test_unknown_event_is_ignored(self):CODE
LOWtests/test_bucket_live_follow.py95 def test_malformed_payload_is_ignored(self):CODE
LOWtests/test_bucket_live_follow.py204 def test_reconciles_then_resumes_from_bucket_timestamp(self, follower_factory):CODE
LOWtests/test_bucket_live_follow.py211 def test_reports_changes_and_resumes_with_the_last_cursor(self, follower_factory):CODE
LOWtests/test_bucket_live_follow.py226 def test_reset_triggers_a_full_reconcile(self, follower_factory):CODE
LOWtests/test_bucket_live_follow.py287 def test_stops_when_the_consumer_is_gone(self, follower_factory):CODE
LOWtests/test_bucket_live_follow.py292 def test_stop_ends_the_thread(self, follower_factory):CODE
LOWtests/test_bucket_live_follow.py330 def test_thread_ends_when_the_file_system_is_garbage_collected(self, quiet_stream):CODE
LOWtests/test_bucket_live_follow.py342 def test_thread_ends_on_stop_even_though_the_stream_is_quiet(self, quiet_stream):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
1964 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 Structure124 hits · 522 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.py2043 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.py2076 Parse safetensors metadata from raw header bytes. This is a shared helper function used by both remote and locSTRING
HIGHsrc/huggingface_hub/hf_api.py2995 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.py3556Resolve 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.py3685 Checks if a repository exists on the Hugging Face Hub. Args: repo_id (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py3730 Checks if a specific revision exists on a repo on the Hugging Face Hub. Args: repo_id (`stSTRING
HIGHsrc/huggingface_hub/hf_api.py3778 Checks if a file exists in a repository on the Hugging Face Hub. Args: repo_id (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py3878 List a repo tree's files and folders and get information about them. Args: repo_id (`str`)STRING
HIGHsrc/huggingface_hub/hf_api.py4046 Verify local files for a repo against Hub checksums. Args: repo_id (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py4193 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.py4280 Get information about a repo's paths. Args: repo_id (`str`): A namespace (STRING
HIGHsrc/huggingface_hub/hf_api.py5034 Creates a commit in the given repo, deleting & uploading files as needed. > [!WARNING] > The iSTRING
HIGHsrc/huggingface_hub/hf_api.py6382Download 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.py6565Download repo files. Download a whole snapshot of a repo's files at the specified revision. This is useful whenSTRING
HIGHsrc/huggingface_hub/hf_api.py6678 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.py6892 Parse metadata from a safetensors file on the Hub. To parse metadata from all safetensors files in a rSTRING
HIGHsrc/huggingface_hub/hf_api.py7623Creates a new comment on the given Discussion. Args: repo_id (`str`): A namespace (STRING
HIGHsrc/huggingface_hub/hf_api.py7699Renames a Discussion. Args: repo_id (`str`): A namespace (user or an organization) STRING
HIGHsrc/huggingface_hub/hf_api.py7767Closes or re-opens a Discussion or Pull Request. Args: repo_id (`str`): A namespaceSTRING
HIGHsrc/huggingface_hub/hf_api.py8002Uploads an image, video or audio file to the Hub and returns its URL. This is what the Hub web editor does whenSTRING
HIGHsrc/huggingface_hub/hf_api.py8421Pause your Space. A paused Space stops executing until manually restarted by its owner. This is different from STRING
HIGHsrc/huggingface_hub/hf_api.py8460Enable dev mode on a Space. Spaces Dev Mode eases the debugging of your application and makes iterating on SpacSTRING
HIGHsrc/huggingface_hub/hf_api.py8504Disable dev mode on a Space. Spaces Dev Mode eases the debugging of your application and makes iterating on SpaSTRING
HIGHsrc/huggingface_hub/hf_api.py8546Restart 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.py8812Wait until a Space reaches a terminal stage (not building/starting). Polls [`get_space_runtime`] every `poll_inSTRING
HIGHsrc/huggingface_hub/hf_api.py8881Duplicate a repo on the Hub (model, dataset, or Space). This performs a server-side copy that preserves full giSTRING
HIGHsrc/huggingface_hub/hf_api.py10421Add an item to a collection on the Hub. Args: collection_slug (`str`): Slug of the STRING
HIGHsrc/huggingface_hub/hf_api.py10608 Get pending access requests for a given gated repo. A pending request means the user has requested accSTRING
HIGHsrc/huggingface_hub/hf_api.py10673 Get accepted access requests for a given gated repo. An accepted request means the user has requested STRING
HIGHsrc/huggingface_hub/hf_api.py10736 Get rejected access requests for a given gated repo. A rejected request means the user has requested aSTRING
HIGHsrc/huggingface_hub/hf_api.py11722 Get an overview of a user on the Hub. Args: username (`str`): Username of STRING
HIGHsrc/huggingface_hub/hf_api.py11749 Get an overview of an organization on the Hub. Args: organization (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11776 List followers of an organization on the Hub. Args: organization (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11804 List of members of an organization on the Hub. Args: organization (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11832 Get the list of followers of a user on the Hub. Args: username (`str`): UsSTRING
HIGHsrc/huggingface_hub/hf_api.py11860 Get the list of users followed by a user on the Hub. Args: username (`str`): STRING
HIGHsrc/huggingface_hub/hf_api.py11939 Get information for a paper on the Hub. Args: id (`str`, **optional**): ArSTRING
HIGHsrc/huggingface_hub/hf_api.py11959 Get the markdown content of a paper page on the Hub. Args: id (`str`): ArXSTRING
HIGHsrc/huggingface_hub/hf_api.py12648 Wait until one or more compute Jobs on Hugging Face infrastructure reach a given stage. Each Job statuSTRING
HIGHsrc/huggingface_hub/hf_api.py13473 Trigger a scheduled Job to run immediately. This triggers one immediate run of the scheduled job's speSTRING
HIGHsrc/huggingface_hub/hf_api.py14065Get information about a specific bucket on the Hub. Args: bucket_id (`str`): The IDSTRING
HIGHsrc/huggingface_hub/hf_api.py15354 Parse metadata from a local safetensors file. For more details regarding the safetensors format, check out httSTRING
HIGHsrc/huggingface_hub/hf_api.py15406 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.py523 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
64 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 Imports869 hits · 470 pts
SeverityFileLineSnippetContext
LOWtests/test_serialization.py41CODE
LOWsrc/huggingface_hub/_upload_pipeline.py38CODE
LOWsrc/huggingface_hub/_upload_pipeline.py61CODE
LOWsrc/huggingface_hub/__init__.py1277CODE
LOWsrc/huggingface_hub/__init__.py1277CODE
LOWsrc/huggingface_hub/__init__.py1277CODE
LOWsrc/huggingface_hub/__init__.py1277CODE
LOWsrc/huggingface_hub/__init__.py1277CODE
LOWsrc/huggingface_hub/__init__.py1277CODE
LOWsrc/huggingface_hub/__init__.py1277CODE
LOWsrc/huggingface_hub/__init__.py1286CODE
LOWsrc/huggingface_hub/__init__.py1286CODE
LOWsrc/huggingface_hub/__init__.py1286CODE
LOWsrc/huggingface_hub/__init__.py1286CODE
LOWsrc/huggingface_hub/__init__.py1292CODE
LOWsrc/huggingface_hub/__init__.py1293CODE
LOWsrc/huggingface_hub/__init__.py1293CODE
LOWsrc/huggingface_hub/__init__.py1293CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1298CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1308CODE
LOWsrc/huggingface_hub/__init__.py1320CODE
LOWsrc/huggingface_hub/__init__.py1320CODE
LOWsrc/huggingface_hub/__init__.py1320CODE
LOWsrc/huggingface_hub/__init__.py1320CODE
LOWsrc/huggingface_hub/__init__.py1320CODE
LOWsrc/huggingface_hub/__init__.py1320CODE
LOWsrc/huggingface_hub/__init__.py1328CODE
LOWsrc/huggingface_hub/__init__.py1328CODE
LOWsrc/huggingface_hub/__init__.py1328CODE
LOWsrc/huggingface_hub/__init__.py1328CODE
LOWsrc/huggingface_hub/__init__.py1328CODE
LOWsrc/huggingface_hub/__init__.py1335CODE
LOWsrc/huggingface_hub/__init__.py1336CODE
LOWsrc/huggingface_hub/__init__.py1336CODE
LOWsrc/huggingface_hub/__init__.py1336CODE
LOWsrc/huggingface_hub/__init__.py1336CODE
LOWsrc/huggingface_hub/__init__.py1342CODE
LOWsrc/huggingface_hub/__init__.py1342CODE
LOWsrc/huggingface_hub/__init__.py1346CODE
LOWsrc/huggingface_hub/__init__.py1346CODE
LOWsrc/huggingface_hub/__init__.py1346CODE
LOWsrc/huggingface_hub/__init__.py1346CODE
LOWsrc/huggingface_hub/__init__.py1346CODE
LOWsrc/huggingface_hub/__init__.py1346CODE
809 more matches not shown…
Empty Error Handlers51 hits · 252 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.py2086except 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.py7039except 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.py806except OSError:CODE
HIGHsrc/huggingface_hub/utils/_cache_manager.py326except OSError:CODE
HIGHsrc/huggingface_hub/cli/cache.py779except FileNotFoundError:CODE
HIGHsrc/huggingface_hub/cli/jobs.py679except httpx2.HTTPError:CODE
HIGHsrc/huggingface_hub/cli/jobs.py2209except KeyboardInterrupt:CODE
HIGHsrc/huggingface_hub/cli/jobs.py2215except multiprocessing.TimeoutError:CODE
HIGHsrc/huggingface_hub/cli/extensions.py665except Exception:CODE
HIGHsrc/huggingface_hub/cli/extensions.py678except Exception:CODE
HIGHsrc/huggingface_hub/cli/extensions.py689except Exception:CODE
HIGHsrc/huggingface_hub/cli/extensions.py751except (OverflowError, OSError, ValueError):CODE
HIGHsrc/huggingface_hub/inference/_mcp/cli.py220except (AttributeError, NotImplementedError):CODE
Excessive Try-Catch Wrapping110 hits · 133 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/_bucket_live_follow.py381 except Exception as e:CODE
LOWsrc/huggingface_hub/_bucket_live_follow.py454 except Exception as e:CODE
LOWsrc/huggingface_hub/_commit_scheduler.py200 except Exception as e:CODE
MEDIUM⚡src/huggingface_hub/__init__.py1231 print(f"Error importing {package_name}.{name}: {e}")CODE
MEDIUM⚡src/huggingface_hub/__init__.py1238 print(f"Error importing {submod_path}: {e}")CODE
LOW⚡src/huggingface_hub/__init__.py1230 except Exception as e:CODE
LOW⚡src/huggingface_hub/__init__.py1237 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
50 more matches not shown…
Over-Commented Block133 hits · 120 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_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# [tool.hf-jobs]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.md2241COMMENT
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/_bucket_live_follow.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
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/__init__.py1261if os.environ.get("EAGER_IMPORT", ""):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/file_download.py1821 # Remove authorization header when downloading a LFS blob from a CDNCOMMENT
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
73 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.py932 # 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.py3655 # Create a commit on `main` branchSTRING
MEDIUM⚡tests/test_hf_api.py3658 # Create a commit in a PRSTRING
MEDIUMtests/test_hf_api.py3203 # Create a SpaceSTRING
MEDIUMtests/test_hf_api.py4298 # 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.py4234 # 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 Nesting100 hits · 83 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_buckets_hf_file_system.py191CODE
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/_bucket_live_follow.py235CODE
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.py1693CODE
LOWsrc/huggingface_hub/file_download.py1969CODE
LOWsrc/huggingface_hub/file_download.py2098CODE
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.py2260CODE
LOWsrc/huggingface_hub/hf_api.py2503CODE
LOWsrc/huggingface_hub/hf_api.py4577CODE
LOWsrc/huggingface_hub/hf_api.py5311CODE
LOWsrc/huggingface_hub/hf_api.py6964CODE
LOWsrc/huggingface_hub/hf_api.py8588CODE
LOWsrc/huggingface_hub/hf_api.py9147CODE
LOWsrc/huggingface_hub/hf_api.py13732CODE
LOWsrc/huggingface_hub/hf_api.py13951CODE
LOWsrc/huggingface_hub/hf_api.py14487CODE
LOWsrc/huggingface_hub/hf_api.py14649CODE
LOWsrc/huggingface_hub/hf_api.py14854CODE
LOWsrc/huggingface_hub/hf_api.py15070CODE
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
40 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.py1618CODE
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.py2311CODE
LOWsrc/huggingface_hub/hf_api.py2503CODE
LOWsrc/huggingface_hub/hf_api.py2775CODE
LOWsrc/huggingface_hub/hf_api.py4577CODE
LOWsrc/huggingface_hub/hf_api.py4981CODE
LOWsrc/huggingface_hub/hf_api.py4999CODE
LOWsrc/huggingface_hub/hf_api.py5018CODE
LOWsrc/huggingface_hub/hf_api.py5586CODE
LOWsrc/huggingface_hub/hf_api.py5604CODE
LOWsrc/huggingface_hub/hf_api.py5623CODE
LOWsrc/huggingface_hub/hf_api.py5769CODE
LOWsrc/huggingface_hub/hf_api.py5789CODE
LOWsrc/huggingface_hub/hf_api.py5810CODE
LOWsrc/huggingface_hub/hf_api.py6327CODE
LOWsrc/huggingface_hub/hf_api.py6346CODE
LOWsrc/huggingface_hub/hf_api.py6365CODE
LOWsrc/huggingface_hub/hf_api.py6507CODE
LOWsrc/huggingface_hub/hf_api.py6527CODE
LOWsrc/huggingface_hub/hf_api.py6547CODE
LOWsrc/huggingface_hub/hf_api.py8864CODE
LOWsrc/huggingface_hub/hf_api.py9205CODE
LOWsrc/huggingface_hub/hf_api.py9706CODE
LOWsrc/huggingface_hub/hf_api.py11978CODE
LOWsrc/huggingface_hub/hf_api.py12122CODE
LOWsrc/huggingface_hub/hf_api.py12872CODE
LOWsrc/huggingface_hub/hf_api.py13072CODE
LOWsrc/huggingface_hub/hf_api.py13552CODE
LOWsrc/huggingface_hub/hf_api.py15208CODE
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.py561CODE
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.py4920 """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.py1600 # Check if file is cached as "no_exist"COMMENT
LOW⚡src/huggingface_hub/file_download.py1604 # Check if revision folder existsCOMMENT
LOW⚡src/huggingface_hub/file_download.py1612 # Check if file exists in cacheCOMMENT
LOWsrc/huggingface_hub/_login.py149 # Check if still logged inCOMMENT
LOWsrc/huggingface_hub/hf_api.py5405 # Check if a `gitignore` file is being committed to the Hub.COMMENT
LOWsrc/huggingface_hub/hf_file_system.py890 # Check if there are directories in repos with non-expanded entriesCOMMENT
LOWsrc/huggingface_hub/hf_file_system.py1289 # Check if the path is in the cacheCOMMENT
LOWsrc/huggingface_hub/hf_file_system.py1518 # 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.py2682 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__.py653__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.py118logger = 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.py745 # Copy the result to make it robust to the cache modificationsCOMMENT
MEDIUMsrc/huggingface_hub/hf_file_system.py482 # 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.md717# Step 1: Generate a plan file (nothing is transferred)COMMENT
LOW⚡docs/source/en/guides/buckets.md726# Step 2: Review the plan file (JSONL format)COMMENT
LOW⚡docs/source/en/guides/buckets.md729# Step 3: Apply the planCOMMENT
LOW⚡docs/source/en/guides/buckets.md736# Step 1: Generate a plan file (nothing is transferred)COMMENT
LOW⚡docs/source/en/guides/buckets.md739# 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.py78# 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.py3805 url = RepoUrl("https://huggingface.co/dummy_user/dummy_model")STRING
LOW⚡tests/test_hf_api.py3806 assert url.namespace == "dummy_user"STRING
LOW⚡tests/test_hf_api.py3808 assert url.repo_id == "dummy_user/dummy_model"STRING
LOWtests/test_hf_api.py3452 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.py550 >>> RepoUrl('https://hub-ci.huggingface.co/datasets/dummy_user/dummy_dataset', endpoint='https://hub-ci.huggingface.CODE
LOWsrc/huggingface_hub/hf_api.py551 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