The official CLI and Python client for the Hugging Face Hub.
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 2549 finding(s).
Are imports declared and package/API names verified? 884 finding(s).
Are wrappers, guards, and repeated structures necessary? 2549 finding(s).
Which changes need focused human review? 3898 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_local_folder.py | 43 | def test_creates_huggingface_dir_with_gitignore(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 76 | def test_gitignore_lock_timeout_is_ignored(tmp_path: Path): | CODE |
| LOW⚡ | tests/test_local_folder.py | 117 | def test_validate_relative_filename_rejects_unsafe(filename: str): | CODE |
| LOW⚡ | tests/test_local_folder.py | 123 | def test_validate_relative_filename_accepts_safe(filename: str): | CODE |
| LOW⚡ | tests/test_local_folder.py | 128 | def test_local_download_paths_rejects_unsafe_filename(tmp_path: Path, filename: str): | CODE |
| LOW⚡ | tests/test_local_folder.py | 134 | def test_local_upload_paths_rejects_unsafe_filename(tmp_path: Path, filename: str): | CODE |
| LOW⚡ | tests/test_local_folder.py | 139 | def test_local_download_paths(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 168 | def test_local_download_paths_are_recreated_each_time(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 182 | def test_local_download_paths_long_paths(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 200 | def test_local_download_paths_long_local_dir(tmp_path: Path, cache_dir_len: int): | CODE |
| LOW | tests/test_local_folder.py | 225 | def test_write_download_metadata(tmp_path: Path): | STRING |
| LOW | tests/test_local_folder.py | 251 | def test_read_download_metadata_valid_metadata(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 266 | def test_read_download_metadata_no_metadata(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 272 | def test_read_download_metadata_corrupted_metadata(tmp_path: Path, caplog: pytest.LogCaptureFixture): | CODE |
| LOW | tests/test_local_folder.py | 286 | def test_read_download_metadata_correct_metadata_missing_file(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 295 | def test_read_download_metadata_correct_metadata_but_outdated(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 322 | def test_local_upload_paths_are_recreated_each_time(tmp_path: Path): | CODE |
| LOW | tests/test_local_folder.py | 336 | def test_local_upload_paths_long_paths(tmp_path: Path): | CODE |
| LOW | tests/test_utils_validators.py | 16 | def test_validate_repo_id_as_arg(self, mocker) -> None: | CODE |
| LOW | tests/test_utils_validators.py | 22 | def test_validate_repo_id_as_kwarg(self, mocker) -> None: | CODE |
| LOW⚡ | tests/test_cli_errors.py | 35 | def test_with_repo_id_and_type(self): | CODE |
| LOW⚡ | tests/test_cli_errors.py | 43 | def test_with_repo_id_dataset(self): | CODE |
| LOW⚡ | tests/test_cli_errors.py | 49 | def test_with_repo_id_no_type(self): | CODE |
| LOW | tests/test_cli_errors.py | 88 | def test_with_repo_id_and_type(self): | CODE |
| LOW | tests/test_cli_errors.py | 93 | def test_with_repo_id_no_type(self): | CODE |
| LOW | tests/test_cli_errors.py | 116 | def test_with_repo_id_and_type(self): | CODE |
| LOW⚡ | tests/test_cli_discussions.py | 94 | def test_list_discussions_quiet(repo_with_discussion: tuple): | CODE |
| LOW⚡ | tests/test_cli_discussions.py | 103 | def test_list_discussions_json(repo_with_discussion: tuple): | CODE |
| LOW⚡ | tests/test_cli_discussions.py | 114 | def test_list_filter_kind_discussion(repo_with_discussion: tuple): | CODE |
| LOW⚡ | tests/test_cli_discussions.py | 123 | def test_list_filter_kind_pull_request(repo_with_discussion: tuple): | CODE |
| LOW⚡ | tests/test_cli_discussions.py | 132 | def test_list_filter_status_closed(repo_with_discussion: tuple): | CODE |
| LOW⚡ | tests/test_cli_discussions.py | 200 | def test_create_body_and_body_file_conflict(repo_for_write: str, tmp_path): | CODE |
| LOW | tests/test_cli_discussions.py | 189 | def test_create_with_body_file(repo_for_write: str, tmp_path): | CODE |
| LOW | tests/test_cli_discussions.py | 259 | def test_close_requires_confirmation(api: HfApi, repo_for_write: str): | CODE |
| LOW | tests/test_cli_discussions.py | 316 | def test_merge_requires_confirmation(api: HfApi, repo_for_write: str): | CODE |
| LOW | tests/test_xet_upload.py | 58 | def assert_xet_pipeline_upload(): | CODE |
| LOW | tests/test_xet_upload.py | 168 | def test_upload_file_with_bytesio(self, api, tmp_path, repo_url): | CODE |
| LOW | tests/test_xet_upload.py | 183 | def test_upload_file_with_byte_array(self, api, tmp_path, repo_url): | CODE |
| LOW | tests/test_xet_upload.py | 198 | def test_fallback_to_lfs_when_xet_not_available(self, api, repo_url): | CODE |
| LOW | tests/test_xet_upload.py | 208 | def test_routes_to_xet_directly_when_available(self): | CODE |
| LOW | tests/test_xet_upload.py | 228 | def test_transfers_bytesio_falls_back_to_lfs(self): | CODE |
| LOW | tests/test_xet_upload.py | 260 | def test_request_headers_passed_to_upload_files(self, tmp_path): | CODE |
| LOW | tests/test_xet_upload.py | 295 | def test_request_headers_passed_to_upload_bytes(self): | CODE |
| LOW | tests/test_xet_upload.py | 353 | def test_upload_folder_create_pr(self, api, repo_url) -> None: | CODE |
| LOW | tests/test_xet_upload.py | 400 | def test_hf_xet_download_with_new_session_api(self, api, tmp_path, repo_url): | CODE |
| LOW | tests/conftest.py | 38 | def reset_oauth_refresh_state(): | CODE |
| LOW | tests/conftest.py | 52 | def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: | CODE |
| LOW | tests/conftest.py | 132 | def disable_symlinks_on_windows_ci(monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW | tests/conftest.py | 148 | def disable_experimental_warnings(monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW | tests/conftest.py | 171 | def production_endpoint_marker(request: SubRequest, monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW | tests/conftest.py | 185 | def expect_deprecation_marker(request: SubRequest) -> Generator[None, None, None]: | CODE |
| LOW | tests/conftest.py | 192 | def test_some_deprecated_method(...): ... | STRING |
| LOW | tests/test_cache_layout.py | 28 | def test_file_downloaded_in_cache(self): | CODE |
| LOW | tests/test_cache_layout.py | 76 | def test_no_exist_file_is_cached(self): | CODE |
| LOW | tests/test_cache_layout.py | 116 | def test_file_download_happens_once(self): | CODE |
| LOW | tests/test_cache_layout.py | 130 | def test_file_download_happens_once_intra_revision(self): | CODE |
| LOW | tests/test_cache_layout.py | 145 | def test_multiple_refs_for_same_file(self): | CODE |
| LOW | tests/test_cache_layout.py | 179 | def test_file_downloaded_in_cache(self): | CODE |
| LOW | tests/test_cache_layout.py | 210 | def test_file_downloaded_in_cache_several_revisions(self): | CODE |
| LOW⚡ | tests/test_cli_output.py | 69 | def test_auto_resolves_to_human(): | CODE |
| 1913 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_cli_discussions.py | 0 | set hf_token and hf_endpoint for all cli tests in this module. | STRING |
| HIGH | tests/test_copy_files.py | 0 | set hf_token and hf_endpoint for all cli tests in this module. | STRING |
| HIGH | tests/test_buckets_cli.py | 0 | set hf_token and hf_endpoint for all cli tests in this module. | STRING |
| HIGH | docs/source/de/guides/integrations.md | 0 | load pytorch pretrained weights and return the loaded model. | STRING |
| HIGH | docs/source/en/guides/integrations.md | 0 | load pytorch pretrained weights and return the loaded model. | STRING |
| HIGH | src/huggingface_hub/hub_mixin.py | 0 | load pytorch pretrained weights and return the loaded model. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | whether to use sampling instead of greedy decoding when generating new tokens. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | whether to use sampling instead of greedy decoding when generating new tokens. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | whether to use sampling instead of greedy decoding when generating new tokens. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | whether to use sampling instead of greedy decoding when generating new tokens. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | controls the stopping condition for beam-based methods. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | controls the stopping condition for beam-based methods. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | controls the stopping condition for beam-based methods. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | controls the stopping condition for beam-based methods. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will be | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will be | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will be | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | if set to float strictly between 0 and 1, only tokens with a conditional probability greater than epsilon_cutoff will be | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a t | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a t | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a t | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | eta sampling is a hybrid of locally typical sampling and epsilon sampling. if set to float strictly between 0 and 1, a t | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | the maximum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | the maximum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | the maximum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | the maximum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | the maximum number of tokens to generate. takes precedence over max_length. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | the maximum number of tokens to generate. takes precedence over max_length. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | the maximum number of tokens to generate. takes precedence over max_length. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | the maximum number of tokens to generate. takes precedence over max_length. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | the minimum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | the minimum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | the minimum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | the minimum length (in tokens) of the generated text, including the input. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | the minimum number of tokens to generate. takes precedence over min_length. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | the minimum number of tokens to generate. takes precedence over min_length. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | the minimum number of tokens to generate. takes precedence over min_length. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | the minimum number of tokens to generate. takes precedence over min_length. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | number 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.py | 0 | number 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.py | 0 | number 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.py | 0 | number 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.py | 0 | the value balances the model confidence and the degeneration penalty in contrastive search decoding. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | the value balances the model confidence and the degeneration penalty in contrastive search decoding. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | the value balances the model confidence and the degeneration penalty in contrastive search decoding. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | the value balances the model confidence and the degeneration penalty in contrastive search decoding. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | the value used to modulate the next token probabilities. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | the value used to modulate the next token probabilities. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | the value used to modulate the next token probabilities. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | the value used to modulate the next token probabilities. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | the number of highest probability vocabulary tokens to keep for top-k-filtering. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | the number of highest probability vocabulary tokens to keep for top-k-filtering. | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | the number of highest probability vocabulary tokens to keep for top-k-filtering. | STRING |
| HIGH | …face_hub/inference/_generated/types/text_generation.py | 0 | the number of highest probability vocabulary tokens to keep for top-k-filtering. | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | the number of highest probability vocabulary tokens to keep for top-k-filtering. | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are | STRING |
| HIGH | …ngface_hub/inference/_generated/types/image_to_text.py | 0 | if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are | STRING |
| HIGH | …gface_hub/inference/_generated/types/text_to_speech.py | 0 | if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are | STRING |
| HIGH | …rence/_generated/types/automatic_speech_recognition.py | 0 | if set to float < 1, only the smallest set of most probable tokens with probabilities that add up to top_p or higher are | STRING |
| HIGH | …ngface_hub/inference/_generated/types/text_to_audio.py | 0 | local typicality measures how similar the conditional probability of predicting a target token next is to the expected c | STRING |
| 52 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | utils/release_notes/generate_slack_message.py | 62 | Run the hf-release-notes:slack OpenCode skill. Args: version: Base version (e.g., "v1.7.0") input_f | STRING |
| HIGH | src/huggingface_hub/lfs.py | 143 | Requests the LFS batch endpoint to retrieve upload instructions Learn more: https://github.com/git-lfs/git-lfs | STRING |
| HIGH | src/huggingface_hub/_buckets.py | 1031 | Sync files between a local directory and a bucket. This is equivalent to the ``hf buckets sync`` CLI command. One o | STRING |
| HIGH | src/huggingface_hub/file_download.py | 878 | Download a given file if it's not already present in the local cache. The new cache file layout looks like this: | STRING |
| HIGH | src/huggingface_hub/_inference_endpoints.py | 265 | Wait for the Inference Endpoint to be deployed. Information from the server will be fetched every 1s. If the In | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 2023 | Parse and validate safetensors metadata size from the first 8 bytes. This is a shared helper function used by | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 2056 | Parse safetensors metadata from raw header bytes. This is a shared helper function used by both remote and loc | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 2969 | List all public repos liked by a user on huggingface.co. This list is public so token is optional. If | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 3530 | Resolve a revision (branch, tag, PR ref) to a commit hash. This is meant for libraries that download and load s | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 3659 | Checks if a repository exists on the Hugging Face Hub. Args: repo_id (`str`): | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 3704 | Checks if a specific revision exists on a repo on the Hugging Face Hub. Args: repo_id (`st | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 3752 | Checks if a file exists in a repository on the Hugging Face Hub. Args: repo_id (`str`): | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 3852 | List a repo tree's files and folders and get information about them. Args: repo_id (`str`) | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 3983 | Verify local files for a repo against Hub checksums. Args: repo_id (`str`): | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 4130 | Get the list of commits of a given revision for a repo on the Hub. Commits are sorted by date (last co | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 4217 | Get information about a repo's paths. Args: repo_id (`str`): A namespace ( | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 4971 | Creates a commit in the given repo, deleting & uploading files as needed. > [!WARNING] > The i | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 6311 | Download a given file if it's not already present in the local cache. The new cache file layout looks like this | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 6494 | Download repo files. Download a whole snapshot of a repo's files at the specified revision. This is useful when | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 6607 | Parse metadata for a safetensors repo on the Hub. We first check if the repo has a single safetensors | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 6762 | Parse metadata from a safetensors file on the Hub. To parse metadata from all safetensors files in a r | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 7493 | Creates a new comment on the given Discussion. Args: repo_id (`str`): A namespace ( | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 7569 | Renames a Discussion. Args: repo_id (`str`): A namespace (user or an organization) | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 7637 | Closes or re-opens a Discussion or Pull Request. Args: repo_id (`str`): A namespace | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 8249 | Pause your Space. A paused Space stops executing until manually restarted by its owner. This is different from | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 8288 | Enable dev mode on a Space. Spaces Dev Mode eases the debugging of your application and makes iterating on Spac | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 8332 | Disable dev mode on a Space. Spaces Dev Mode eases the debugging of your application and makes iterating on Spa | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 8374 | Restart your Space. This is the only way to programmatically restart a Space if you've put it on Pause (see [`p | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 8615 | Wait until a Space reaches a terminal stage (not building/starting). Polls [`get_space_runtime`] every `poll_in | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 8684 | Duplicate a repo on the Hub (model, dataset, or Space). This performs a server-side copy that preserves full gi | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 10224 | Add an item to a collection on the Hub. Args: collection_slug (`str`): Slug of the | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 10411 | Get pending access requests for a given gated repo. A pending request means the user has requested acc | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 10475 | Get accepted access requests for a given gated repo. An accepted request means the user has requested | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 10537 | Get rejected access requests for a given gated repo. A rejected request means the user has requested a | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11488 | Get an overview of a user on the Hub. Args: username (`str`): Username of | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11515 | Get an overview of an organization on the Hub. Args: organization (`str`): | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11542 | List followers of an organization on the Hub. Args: organization (`str`): | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11570 | List of members of an organization on the Hub. Args: organization (`str`): | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11598 | Get the list of followers of a user on the Hub. Args: username (`str`): Us | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11626 | Get the list of users followed by a user on the Hub. Args: username (`str`): | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11705 | Get information for a paper on the Hub. Args: id (`str`, **optional**): Ar | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 11725 | Get the markdown content of a paper page on the Hub. Args: id (`str`): ArX | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 12414 | Wait until one or more compute Jobs on Hugging Face infrastructure reach a given stage. Each Job statu | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 13239 | Trigger a scheduled Job to run immediately. This triggers one immediate run of the scheduled job's spe | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 13831 | Get information about a specific bucket on the Hub. Args: bucket_id (`str`): The ID | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 15120 | Parse metadata from a local safetensors file. For more details regarding the safetensors format, check out htt | STRING |
| HIGH | src/huggingface_hub/hf_api.py | 15172 | Parse metadata for a local safetensors file or folder. Supports: - Single safetensors file (e.g., `model.s | STRING |
| HIGH | src/huggingface_hub/_snapshot_download.py | 145 | Download repo files. Download a whole snapshot of a repo's files at the specified revision. This is useful when you | STRING |
| HIGH | src/huggingface_hub/_snapshot_download.py | 612 | Return the cached tree listing of a repo at a given revision, without any network call. The tree listing is the set | STRING |
| HIGH | src/huggingface_hub/hf_file_system.py | 283 | Resolve a Hugging Face file system path into its components. Args: path (`str`): | STRING |
| HIGH | src/huggingface_hub/_commit_api.py | 804 | Fetch information about the files to copy. For LFS files, we only need their metadata (file size and sha256) w | STRING |
| HIGH | src/huggingface_hub/serialization/_dduf.py | 92 | Read a DDUF file and return a dictionary of entries. Only the metadata is read, the data is not loaded in memo | STRING |
| HIGH | src/huggingface_hub/serialization/_torch.py | 386 | Load a checkpoint into a model, handling both sharded and non-sharded checkpoints. Args: model (`torch | STRING |
| HIGH | src/huggingface_hub/serialization/_torch.py | 641 | Loads a checkpoint file, handling both safetensors and pickle checkpoint formats. Args: checkpoint_fil | STRING |
| HIGH | src/huggingface_hub/utils/_hf_uris.py | 260 | Parse a Hugging Face Hub URI ('hf://...') or a Hugging Face web URL. A HF URI is a URI-like string identifying a lo | STRING |
| HIGH | src/huggingface_hub/utils/_hf_uris.py | 444 | Parse a HF mount specification ('hf://...:<MOUNT_PATH>[:ro|:rw]'). A mount specification is a HF URI followed by a | STRING |
| HIGH | src/huggingface_hub/utils/_paths.py | 74 | Filter repo objects based on an allowlist and a denylist. Input must be a list of paths (`str` or `Path`) or a list | STRING |
| HIGH | src/huggingface_hub/utils/_xet.py | 114 | Utilizes the information in the parsed metadata to request the Hub xet connection information. This includes th | STRING |
| HIGH | src/huggingface_hub/utils/_xet.py | 141 | Requests the xet connection info from the supplied URL. This includes the access token, expiration time, and en | STRING |
| HIGH | src/huggingface_hub/utils/_oauth_device.py | 87 | Poll the token endpoint until the user authorizes the device. Args: device_info (`DeviceCodeInfo`): | STRING |
| 63 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_cli_discussions.py | 82 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_discussions.py | 84 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_discussions.py | 140 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_discussions.py | 142 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_discussions.py | 210 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_discussions.py | 212 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 164 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 166 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 238 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 240 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 282 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 284 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 297 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 299 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 331 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_discussions.py | 333 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_output.py | 64 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_output.py | 66 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_output.py | 89 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_output.py | 91 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_output.py | 207 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_cli_output.py | 209 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_cli_output.py | 114 | # ============================================================================= | STRING |
| MEDIUM⚡ | tests/test_cli_output.py | 116 | # ============================================================================= | STRING |
| MEDIUM⚡ | tests/test_cli_output.py | 381 | # ============================================================================= | STRING |
| MEDIUM⚡ | tests/test_cli_output.py | 383 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 235 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 237 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 284 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 286 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 361 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 363 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 407 | # ============================================================================= | STRING |
| MEDIUM | tests/test_cli_output.py | 409 | # ============================================================================= | STRING |
| MEDIUM⚡ | tests/test_copy_files.py | 131 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_copy_files.py | 133 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_copy_files.py | 150 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_copy_files.py | 152 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_copy_files.py | 294 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_copy_files.py | 296 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_copy_files.py | 375 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_copy_files.py | 377 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 208 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 210 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 231 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 233 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 465 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 467 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 570 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 572 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 819 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_buckets_cli.py | 821 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 95 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 97 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 163 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 165 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 183 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 185 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 482 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_buckets_cli.py | 484 | # ============================================================================= | COMMENT |
| 100 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_serialization.py | 41 | CODE | |
| LOW | src/huggingface_hub/_upload_pipeline.py | 38 | CODE | |
| LOW | src/huggingface_hub/_upload_pipeline.py | 61 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1271 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1271 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1271 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1271 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1271 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1271 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1271 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1280 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1280 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1280 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1280 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1286 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1287 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1287 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1287 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1292 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1302 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1314 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1314 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1314 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1314 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1314 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1314 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1322 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1322 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1322 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1322 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1322 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1329 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1330 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1330 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1330 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1330 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1336 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1336 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1340 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1340 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1340 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1340 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1340 | CODE | |
| LOW | src/huggingface_hub/__init__.py | 1340 | CODE | |
| 805 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_utils_http.py | 491 | except httpx2.HTTPError: | CODE |
| HIGH | tests/test_commit_scheduler.py | 23 | except AttributeError: | CODE |
| HIGH | src/huggingface_hub/_upload_pipeline.py | 556 | except Exception: | CODE |
| HIGH | src/huggingface_hub/_local_folder.py | 466 | except IndexError: | CODE |
| HIGH | src/huggingface_hub/_local_folder.py | 468 | except OSError: # TimeoutError, FileNotFoundError, PermissionError, etc. | CODE |
| HIGH | src/huggingface_hub/_local_folder.py | 472 | except OSError: | CODE |
| HIGH | src/huggingface_hub/_local_folder.py | 487 | except OSError: | CODE |
| HIGH | src/huggingface_hub/_local_folder.py | 424 | except FileNotFoundError: | CODE |
| HIGH | src/huggingface_hub/_buckets.py | 616 | except Exception: | CODE |
| HIGH | src/huggingface_hub/_buckets.py | 705 | except Exception: | CODE |
| HIGH | src/huggingface_hub/file_download.py | 663 | except OSError: | CODE |
| HIGH | src/huggingface_hub/file_download.py | 713 | except PermissionError: | CODE |
| HIGH | src/huggingface_hub/file_download.py | 779 | except OSError: # raise on anything: file does not exist or space disk cannot be checked | CODE |
| HIGH | src/huggingface_hub/file_download.py | 1229 | except OSError: | CODE |
| HIGH | src/huggingface_hub/file_download.py | 2085 | except OSError: | CODE |
| HIGH | src/huggingface_hub/_sandbox.py | 751 | except httpx2.RequestError: | CODE |
| HIGH | src/huggingface_hub/_sandbox.py | 2071 | except Exception: | CODE |
| HIGH | src/huggingface_hub/_sandbox.py | 1705 | except Exception: | CODE |
| HIGH | src/huggingface_hub/_login.py | 140 | except FileNotFoundError: | CODE |
| HIGH | src/huggingface_hub/hf_api.py | 6909 | except HfHubHTTPError: | CODE |
| HIGH | src/huggingface_hub/serialization/_torch.py | 849 | except ImportError: | CODE |
| HIGH | src/huggingface_hub/serialization/_torch.py | 860 | except ImportError: | CODE |
| HIGH | src/huggingface_hub/serialization/_torch.py | 905 | except ImportError: | CODE |
| HIGH | src/huggingface_hub/serialization/_torch.py | 915 | except ImportError: | CODE |
| HIGH | src/huggingface_hub/serialization/_torch.py | 962 | except ImportError: | CODE |
| HIGH | src/huggingface_hub/serialization/_torch.py | 1070 | except ImportError: | CODE |
| HIGH | src/huggingface_hub/utils/_shared_blobs.py | 348 | except OSError: | CODE |
| HIGH | src/huggingface_hub/utils/_shared_blobs.py | 332 | except OSError: | CODE |
| HIGH | src/huggingface_hub/utils/_shared_blobs.py | 364 | except OSError: | CODE |
| HIGH | src/huggingface_hub/utils/_shared_blobs.py | 565 | except OSError: | CODE |
| HIGH | src/huggingface_hub/utils/_parsing.py | 63 | except ValueError: | CODE |
| HIGH | src/huggingface_hub/utils/_fixes.py | 67 | except Exception: | CODE |
| HIGH | src/huggingface_hub/utils/_fixes.py | 60 | except Exception: | CODE |
| HIGH | src/huggingface_hub/utils/_fixes.py | 122 | except OSError: | CODE |
| HIGH | src/huggingface_hub/utils/_xet.py | 297 | except Exception: | CODE |
| HIGH | src/huggingface_hub/utils/_runtime.py | 413 | except Exception: | CODE |
| HIGH | src/huggingface_hub/utils/_runtime.py | 408 | except Exception: | CODE |
| HIGH | src/huggingface_hub/utils/_runtime.py | 73 | except importlib.metadata.PackageNotFoundError: | CODE |
| HIGH | src/huggingface_hub/utils/_oauth_device.py | 122 | except (httpx2.HTTPError, ValueError): | CODE |
| HIGH | src/huggingface_hub/utils/_auth.py | 48 | except (OSError, NotImplementedError): | CODE |
| HIGH | src/huggingface_hub/utils/_cache_manager.py | 809 | except OSError: | CODE |
| HIGH | src/huggingface_hub/utils/_cache_manager.py | 326 | except OSError: | CODE |
| HIGH | src/huggingface_hub/cli/cache.py | 771 | except FileNotFoundError: | CODE |
| HIGH | src/huggingface_hub/cli/jobs.py | 2180 | except KeyboardInterrupt: | CODE |
| HIGH | src/huggingface_hub/cli/jobs.py | 2186 | except multiprocessing.TimeoutError: | CODE |
| HIGH | src/huggingface_hub/cli/extensions.py | 584 | except Exception: | CODE |
| HIGH | src/huggingface_hub/cli/extensions.py | 597 | except Exception: | CODE |
| HIGH | src/huggingface_hub/cli/extensions.py | 608 | except Exception: | CODE |
| HIGH | src/huggingface_hub/cli/extensions.py | 671 | except (OverflowError, OSError, ValueError): | CODE |
| HIGH | src/huggingface_hub/inference/_mcp/cli.py | 220 | except (AttributeError, NotImplementedError): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_cache_layout.py | 314 | except Exception: | CODE |
| LOW | tests/testing_utils.py | 83 | except Exception as e: | CODE |
| LOW | tests/test_xet_utils.py | 165 | except Exception: | CODE |
| MEDIUM | utils/check_all_variable.py | 83 | print("Error: _SUBMOD_ATTRS dictionary not found in `./src/huggingface_hub/__init__.py`.") | CODE |
| MEDIUM | utils/check_hardware_flavors.py | 70 | print(f"Error: could not find class {class_name} in source.") | CODE |
| MEDIUM | utils/check_hardware_flavors.py | 77 | print(f"Error: could not find docstring end for class {class_name}.") | CODE |
| MEDIUM⚡ | utils/check_hardware_flavors.py | 148 | print(f"Error: could not find class {class_name}.") | CODE |
| MEDIUM | utils/check_hardware_flavors.py | 178 | print(f"Error running `hf jobs hardware`:\n{result.stderr}") | CODE |
| MEDIUM | utils/check_hardware_flavors.py | 199 | print(f"Error: could not find hardware table markers in {JOBS_GUIDE_PATH}.") | CODE |
| MEDIUM | utils/release_notes/generate_slack_message.py | 82 | print("Error: 'opencode' command not found in PATH", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_slack_message.py | 99 | print("Error: 'opencode' command not found", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_slack_message.py | 123 | print(f"Error: {e}", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_slack_message.py | 130 | print(f"Error: Release notes file not found for {version}", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_slack_message.py | 152 | print(f"Error: OpenCode did not produce output at {body_file}", file=sys.stderr) | CODE |
| LOW | utils/release_notes/fetch_prs.py | 166 | except Exception as e: | CODE |
| MEDIUM | utils/release_notes/validate_notes.py | 110 | print(f"Error: {e}", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_release_notes.py | 112 | print("Error: 'opencode' command not found in PATH", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_release_notes.py | 131 | print("Error: 'opencode' command not found", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_release_notes.py | 156 | print(f"Error: {e}", file=sys.stderr) | CODE |
| MEDIUM | utils/release_notes/generate_release_notes.py | 176 | print(f"Error: {e}", file=sys.stderr) | CODE |
| LOW | src/huggingface_hub/repocard_data.py | 387 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_dataset_viewer.py | 97 | except Exception: | CODE |
| LOW | src/huggingface_hub/_upload_pipeline.py | 556 | except Exception: | CODE |
| LOW | src/huggingface_hub/_upload_pipeline.py | 615 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_commit_scheduler.py | 200 | except Exception as e: | CODE |
| MEDIUM⚡ | src/huggingface_hub/__init__.py | 1225 | print(f"Error importing {package_name}.{name}: {e}") | CODE |
| MEDIUM⚡ | src/huggingface_hub/__init__.py | 1232 | print(f"Error importing {submod_path}: {e}") | CODE |
| LOW⚡ | src/huggingface_hub/__init__.py | 1224 | except Exception as e: | CODE |
| LOW⚡ | src/huggingface_hub/__init__.py | 1231 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_local_folder.py | 322 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_local_folder.py | 329 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_local_folder.py | 397 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_local_folder.py | 404 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox_cache.py | 183 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox_cache.py | 237 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox_cache.py | 256 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_buckets.py | 616 | except Exception: | CODE |
| LOW | src/huggingface_hub/_buckets.py | 705 | except Exception: | CODE |
| MEDIUM | src/huggingface_hub/_sandbox.py | 1795 | def __exit__(self, *exc_info) -> None: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 552 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 569 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 940 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 945 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 967 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 1018 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 1677 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 1698 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 1705 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 1771 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 1854 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2035 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2065 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2071 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2132 | except Exception: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2135 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2283 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2512 | except Exception as e: | CODE |
| LOW | src/huggingface_hub/_sandbox.py | 2586 | except Exception: | CODE |
| LOW | src/huggingface_hub/_login.py | 385 | except Exception as error: | CODE |
| LOW | src/huggingface_hub/hf_file_system.py | 1365 | except Exception: | CODE |
| 46 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_local_folder.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_cli_discussions.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_xet_upload.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_cache_layout.py | 241 | k: [os.path.normpath(os.path.join(k, link)) for link in v] for k, v in links_in_snapshots.items() | COMMENT |
| LOW | tests/test_cli_output.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_hf_file_system.py | 401 | def test_get_file_on_folder(self): | COMMENT |
| LOW | tests/test_inference_client.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_copy_files.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_buckets_cli.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_hf_api.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_cli_framework.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_utils_detect_agent.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_oauth.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_tree_cache.py | 1 | # Copyright 2026-present, the HuggingFace Inc. team. | COMMENT |
| LOW | tests/test_inference_async_client.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_kernels.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_repocard.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_file_download.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_buckets.py | 1 | # coding=utf-8 | COMMENT |
| LOW | tests/test_endpoint_helpers.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_cli.py | 4141 | # image = "vllm/vllm-openai:latest" | COMMENT |
| LOW | tests/test_utils_hf_uris.py | 1 | # Copyright 2026-present, the HuggingFace Inc. team. | COMMENT |
| LOW | utils/check_task_parameters.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/check_all_variable.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/generate_inference_types.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/push_repocard_examples.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/check_inference_input_params.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/generate_async_inference_client.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/check_hardware_flavors.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/check_static_imports.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/helpers.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/check_imports.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | utils/_legacy_check_future_compatible_signatures.py | 1 | # coding=utf-8 | COMMENT |
| LOW | utils/_legacy_check_future_compatible_signatures.py | 41 | from huggingface_hub.hf_api import HfApi | COMMENT |
| LOW | docs/source/en/guides/cli.md | 2241 | # dependencies = ["vllm", "datasets"] | COMMENT |
| LOW | .github/workflows/release.yml | 1 | # Unified release workflow for huggingface_hub. | COMMENT |
| LOW | .github/workflows/release.yml | 21 | # For a patch release, cherry-pick fixes to the release branch first, then trigger a "patch-release" run. This increment | COMMENT |
| LOW | .github/workflows/release.yml | 41 | # - APP_SECRET_PEM_HUGGINGFACE_HUB_BOT : GitHub App private key for huggingface-hub-bot | COMMENT |
| LOW | .github/workflows/release.yml | 421 | --arg thread_ts "${{ needs.prepare.outputs.message_ts }}" \ | COMMENT |
| LOW | .github/workflows/release.yml | 741 | --arg file_id "$FILE_ID" \ | COMMENT |
| LOW | .github/workflows/close-unscoped-community-prs.yml | 1 | # Enforces the "open an issue first" policy from CONTRIBUTING.md for community contributions: | COMMENT |
| LOW | src/huggingface_hub/repocard_data.py | 61 | # Required | COMMENT |
| LOW | src/huggingface_hub/repocard_data.py | 81 | metric_value: Any | COMMENT |
| LOW | src/huggingface_hub/_dataset_viewer.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | src/huggingface_hub/_webhooks_payload.py | 1 | # Copyright 2023-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/_upload_pipeline.py | 1 | # coding=utf-8 | COMMENT |
| LOW | src/huggingface_hub/_webhooks_server.py | 1 | # Copyright 2023-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/_space_api.py | 1 | # Copyright 2019-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/_tree_cache.py | 1 | # Copyright 2026-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/__init__.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | src/huggingface_hub/__init__.py | 21 | # quickly without the hassle of importing all the features from `huggingface_hub`. | COMMENT |
| LOW | src/huggingface_hub/_local_folder.py | 1 | # Copyright 2024-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/lfs.py | 1 | # Copyright 2019-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/_sandbox_cache.py | 1 | # coding=utf-8 | COMMENT |
| LOW | src/huggingface_hub/_buckets.py | 1 | # Copyright 2026-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/_sandbox.py | 1 | # coding=utf-8 | COMMENT |
| LOW | src/huggingface_hub/_sandbox.py | 1461 | # all find every host full boots one host at a time (each new host frees | COMMENT |
| LOW | src/huggingface_hub/_login.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | src/huggingface_hub/hf_api.py | 1 | # Copyright 2019-present, the HuggingFace Inc. team. | COMMENT |
| LOW | src/huggingface_hub/_jobs_api.py | 1 | # Copyright 2025-present, the HuggingFace Inc. team. | COMMENT |
| 71 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_xet_upload.py | 114 | # Create a regular text file | COMMENT |
| MEDIUM⚡ | tests/test_xet_upload.py | 119 | # Create a binary file | COMMENT |
| MEDIUM⚡ | tests/test_xet_upload.py | 128 | # Create a nested text file | COMMENT |
| MEDIUM⚡ | tests/test_xet_upload.py | 133 | # Create a nested binary file | COMMENT |
| MEDIUM⚡ | tests/test_hf_file_system.py | 926 | # Create a new repo | COMMENT |
| MEDIUM | tests/test_hf_api.py | 593 | # Create a commit with a PR | COMMENT |
| MEDIUM | tests/test_hf_api.py | 670 | # Create a repo with another user. The normal CI user don't have rights on it. | COMMENT |
| MEDIUM | tests/test_hf_api.py | 734 | # Creating a commit with a parent commit that is not the current main should fail | COMMENT |
| MEDIUM | tests/test_hf_api.py | 1458 | # Create a PR with a readme | COMMENT |
| MEDIUM | tests/test_hf_api.py | 1483 | # Create a PR with a readme | COMMENT |
| MEDIUM⚡ | tests/test_hf_api.py | 3647 | # Create a commit on `main` branch | STRING |
| MEDIUM⚡ | tests/test_hf_api.py | 3650 | # Create a commit in a PR | STRING |
| MEDIUM | tests/test_hf_api.py | 3195 | # Create a Space | STRING |
| MEDIUM | tests/test_hf_api.py | 4267 | # Create a webhook to be used in the tests | STRING |
| MEDIUM | tests/test_utils_strict_dataclass.py | 572 | # Create a sample script | COMMENT |
| MEDIUM | tests/test_utils_strict_dataclass.py | 593 | # Create a sample script | STRING |
| MEDIUM | tests/test_utils_strict_dataclass.py | 615 | # Create a sample script | STRING |
| MEDIUM | tests/test_utils_strict_dataclass.py | 635 | # Create a sample script | STRING |
| MEDIUM | tests/test_file_download.py | 1137 | # Create a mock response object | COMMENT |
| MEDIUM | tests/test_file_download.py | 1224 | # Create a mock response object | COMMENT |
| MEDIUM | tests/test_inference_endpoints.py | 409 | # Create an iterator that yields three MOCK_UPDATE responses,and then infinitely yields MOCK_RUNNING responses. | COMMENT |
| MEDIUM | utils/check_task_parameters.py | 309 | # Create a new parameter with the provided type and a default value of None | COMMENT |
| MEDIUM | utils/check_task_parameters.py | 399 | # Create the parameter line with type and optionality | COMMENT |
| MEDIUM | utils/generate_inference_types.py | 71 | # This file is auto-generated by `utils/generate_inference_types.py`. | COMMENT |
| MEDIUM | src/huggingface_hub/repocard_data.py | 583 | >>> # Define a minimal model index | STRING |
| MEDIUM | src/huggingface_hub/_dataset_viewer.py | 91 | # Create a new connection (Python API). | COMMENT |
| MEDIUM | src/huggingface_hub/_webhooks_payload.py | 24 | # Define a dummy BaseModel to avoid import errors when pydantic is not installed | COMMENT |
| MEDIUM | src/huggingface_hub/_local_folder.py | 67 | "# This file is a cache directory tag created by huggingface_hub.\n" | CODE |
| MEDIUM | src/huggingface_hub/_local_folder.py | 455 | # Create a CACHEDIR.TAG so backup tools can skip this directory. | COMMENT |
| MEDIUM | src/huggingface_hub/_oauth.py | 139 | # Create a FastAPI app | STRING |
| MEDIUM | src/huggingface_hub/hf_api.py | 4171 | # Create an empty branch by deriving from initial commit | STRING |
| MEDIUM | src/huggingface_hub/dataclasses.py | 194 | # Define a default __post_init__ if not defined | COMMENT |
| MEDIUM | src/huggingface_hub/dataclasses.py | 363 | # Create a strict dataclass from the TypedDict fields | COMMENT |
| MEDIUM⚡ | src/huggingface_hub/utils/_shared_blobs.py | 320 | # Create the lock file ourselves: `O_NOFOLLOW` refuses a planted symlink and 0o666 lets other users of a | COMMENT |
| MEDIUM | src/huggingface_hub/inference/_mcp/mcp_client.py | 276 | # Create the streaming request | COMMENT |
| MEDIUM | …huggingface_hub/inference/_generated/types/__init__.py | 1 | # This file is auto-generated by `utils/generate_inference_types.py`. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/testing_utils.py | 54 | CODE | |
| LOW | tests/test_snapshot_download.py | 236 | CODE | |
| LOW | tests/test_snapshot_download.py | 247 | CODE | |
| LOW | tests/test_snapshot_download.py | 259 | CODE | |
| LOW | tests/test_snapshot_download.py | 271 | CODE | |
| LOW | tests/test_xet_download.py | 230 | CODE | |
| LOW | tests/test_sandbox.py | 204 | CODE | |
| LOW | tests/test_sandbox.py | 265 | CODE | |
| LOW | tests/test_utils_fixes.py | 33 | CODE | |
| LOW | tests/test_utils_tqdm.py | 113 | CODE | |
| LOW | utils/check_task_parameters.py | 701 | CODE | |
| LOW | utils/check_task_parameters.py | 106 | CODE | |
| LOW | utils/check_task_parameters.py | 132 | CODE | |
| LOW | utils/check_task_parameters.py | 418 | CODE | |
| LOW | utils/generate_cli_reference.py | 80 | CODE | |
| LOW | utils/check_hardware_flavors.py | 100 | CODE | |
| LOW | src/huggingface_hub/hub_mixin.py | 453 | CODE | |
| LOW | src/huggingface_hub/_upload_pipeline.py | 92 | CODE | |
| LOW | src/huggingface_hub/_upload_pipeline.py | 255 | CODE | |
| LOW | src/huggingface_hub/_upload_pipeline.py | 480 | CODE | |
| LOW | src/huggingface_hub/_local_folder.py | 296 | CODE | |
| LOW | src/huggingface_hub/_local_folder.py | 347 | CODE | |
| LOW | src/huggingface_hub/_buckets.py | 383 | CODE | |
| LOW | src/huggingface_hub/_buckets.py | 449 | CODE | |
| LOW | src/huggingface_hub/_buckets.py | 562 | CODE | |
| LOW | src/huggingface_hub/_buckets.py | 892 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 92 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 334 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 1068 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 1313 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 1692 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 1968 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 2097 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 1075 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 1633 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 1807 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 2248 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 2234 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 2477 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 4514 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 5240 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 6834 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 8416 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 8950 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 13498 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 13717 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 14253 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 14415 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 14620 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 14836 | CODE | |
| LOW | src/huggingface_hub/dataclasses.py | 56 | CODE | |
| LOW | src/huggingface_hub/dataclasses.py | 337 | CODE | |
| LOW | src/huggingface_hub/dataclasses.py | 460 | CODE | |
| LOW | src/huggingface_hub/dataclasses.py | 561 | CODE | |
| LOW | src/huggingface_hub/dataclasses.py | 112 | CODE | |
| LOW | src/huggingface_hub/dataclasses.py | 158 | CODE | |
| LOW | src/huggingface_hub/_snapshot_download.py | 123 | CODE | |
| LOW | src/huggingface_hub/repocard.py | 528 | CODE | |
| LOW | src/huggingface_hub/repocard.py | 689 | CODE | |
| LOW | src/huggingface_hub/hf_file_system.py | 528 | CODE | |
| 37 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/huggingface_hub/repocard_data.py | 335 | CODE | |
| LOW | src/huggingface_hub/repocard_data.py | 440 | CODE | |
| LOW | src/huggingface_hub/repocard_data.py | 530 | CODE | |
| LOW | src/huggingface_hub/hub_mixin.py | 185 | CODE | |
| LOW | src/huggingface_hub/hub_mixin.py | 610 | CODE | |
| LOW | src/huggingface_hub/_commit_scheduler.py | 101 | CODE | |
| LOW | src/huggingface_hub/_buckets.py | 1011 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 784 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 808 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 832 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 857 | CODE | |
| LOW | src/huggingface_hub/file_download.py | 1617 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 836 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 1048 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 1075 | CODE | |
| LOW | src/huggingface_hub/_sandbox.py | 1358 | CODE | |
| LOW | src/huggingface_hub/_inference_endpoints.py | 328 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 2285 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 2477 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 2749 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 4514 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 4918 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 4936 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 4955 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 5515 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 5533 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 5552 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 5698 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 5718 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 5739 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 6256 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 6275 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 6294 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 6436 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 6456 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 6476 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 8667 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 9008 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 9509 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 11744 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 11888 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 12638 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 12838 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 13318 | CODE | |
| LOW | src/huggingface_hub/hf_api.py | 14974 | CODE | |
| LOW | src/huggingface_hub/_snapshot_download.py | 47 | CODE | |
| LOW | src/huggingface_hub/_snapshot_download.py | 72 | CODE | |
| LOW | src/huggingface_hub/_snapshot_download.py | 97 | CODE | |
| LOW | src/huggingface_hub/_snapshot_download.py | 123 | CODE | |
| LOW | src/huggingface_hub/repocard.py | 689 | CODE | |
| LOW | src/huggingface_hub/_jobs_api.py | 635 | CODE | |
| LOW | src/huggingface_hub/_tensorboard_logger.py | 114 | CODE | |
| LOW | src/huggingface_hub/fastai_utils.py | 335 | CODE | |
| LOW | src/huggingface_hub/utils/_lfs.py | 89 | CODE | |
| LOW | src/huggingface_hub/cli/models.py | 80 | CODE | |
| LOW | src/huggingface_hub/cli/upload.py | 53 | CODE | |
| LOW | src/huggingface_hub/cli/_framework.py | 563 | CODE | |
| LOW | src/huggingface_hub/cli/download.py | 40 | CODE | |
| LOW | src/huggingface_hub/cli/datasets.py | 72 | CODE | |
| LOW | src/huggingface_hub/cli/spaces.py | 109 | CODE | |
| 51 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/test_cli_output.py | 106 | {"user": "Wauplin", "orgs": "org1,org2", "email": null} | CODE |
| HIGH⚡ | tests/test_inference_client.py | 1003 | 'data: {"index":1,"token":{"id":4560,"text":" trying","logprob":-2.078125,"special":false},"generated_text":null | CODE |
| HIGH⚡ | tests/test_inference_client.py | 1006 | 'data: {"index":2,"token":{"id":311,"text":" to","logprob":-0.026245117,"special":false},"generated_text":" tryi | CODE |
| HIGH⚡ | tests/test_inference_client.py | 1009 | 'data: {"index":2,"token":{"id":311,"text":" to","logprob":-0.026245117,"special":false},"generated_text":" tryi | CODE |
| HIGH⚡ | tests/test_inference_client.py | 1026 | 'data: {"object":"chat.completion.chunk","id":"","created":1721737661,"model":"","system_fingerprint":"2.1.2-dev | CODE |
| HIGH⚡ | tests/test_inference_client.py | 1029 | 'data: {"object":"chat.completion.chunk","id":"","created":1721737661,"model":"","system_fingerprint":"2.1.2-dev | CODE |
| HIGH⚡ | tests/test_inference_client.py | 1032 | 'data: {"index":2,"token":{"id":311,"text":" to","logprob":-0.026245117,"special":false},"generated_text":" tryi | CODE |
| HIGH⚡ | tests/test_inference_client.py | 1046 | 'data: {"object":"chat.completion.chunk","id":"","created":1721737661,"model":"","system_fingerprint":"2.1.2-dev | CODE |
| HIGH | tests/test_repocard_data.py | 180 | """model-index YAML may have 'source: null' (explicit null, which is valid YAML). | STRING |
| HIGH⚡ | tests/test_hf_api.py | 4889 | """The API returns registry credentials redacted (`{"username": "", "password": null}`), so echoing the | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_hf_api.py | 786 | # Set repo to track png files as LFS | COMMENT |
| LOW⚡ | utils/check_task_parameters.py | 112 | # Check if the statement is a simple statement (like a variable declaration) | COMMENT |
| LOW⚡ | utils/check_task_parameters.py | 115 | # Check if it's an annotated assignment (typical for dataclass fields) | COMMENT |
| LOW⚡ | utils/check_task_parameters.py | 120 | # Check if there's a default value | COMMENT |
| LOW | utils/check_task_parameters.py | 138 | # Check if the next statement is a simple statement (like a string) | COMMENT |
| LOW | utils/check_task_parameters.py | 142 | # Check if the statement is a string expression (potential docstring) | COMMENT |
| LOW | utils/check_task_parameters.py | 322 | # Check if the first statement is a docstring | COMMENT |
| LOW | utils/check_task_parameters.py | 441 | # Check if the line is a parameter line | COMMENT |
| LOW | utils/generate_inference_types.py | 260 | # Check if this is a field (AnnAssign) | COMMENT |
| LOW | utils/check_hardware_flavors.py | 239 | # Check if the hardware table in the docs needs updating. | COMMENT |
| LOW | utils/release_notes/generate_release_notes.py | 109 | # Check if opencode is available | COMMENT |
| LOW | utils/installers/install.sh | 176 | # Check if command exists | COMMENT |
| LOW | utils/installers/install.sh | 318 | # Check if uv is available and use it for faster installation | COMMENT |
| LOW | utils/installers/install.sh | 350 | # Check if transformers is installed in the venv (using importlib.metadata for speed) | COMMENT |
| LOW | .github/workflows/release.yml | 1248 | # Check if huggingface-hub-bot already commented on this PR | COMMENT |
| LOW | .github/workflows/release.yml | 1324 | # Check if any job failed or was cancelled (including prepare itself, | COMMENT |
| LOW | src/huggingface_hub/hub_mixin.py | 527 | # Check if `config` argument was passed at init | COMMENT |
| LOW⚡ | src/huggingface_hub/file_download.py | 1599 | # Check if file is cached as "no_exist" | COMMENT |
| LOW⚡ | src/huggingface_hub/file_download.py | 1603 | # Check if revision folder exists | COMMENT |
| LOW⚡ | src/huggingface_hub/file_download.py | 1611 | # Check if file exists in cache | COMMENT |
| LOW | src/huggingface_hub/_login.py | 149 | # Check if still logged in | COMMENT |
| LOW | src/huggingface_hub/hf_api.py | 5334 | # Check if a `gitignore` file is being committed to the Hub. | COMMENT |
| LOW | src/huggingface_hub/hf_file_system.py | 575 | # Check if there are directories in repos with non-expanded entries | COMMENT |
| LOW | src/huggingface_hub/hf_file_system.py | 965 | # Check if the path is in the cache | COMMENT |
| LOW | src/huggingface_hub/hf_file_system.py | 1194 | # Close file only if we opened it ourselves | COMMENT |
| LOW | src/huggingface_hub/serialization/_torch.py | 698 | # Check if file exists and is a regular file (not a directory) | COMMENT |
| LOW | src/huggingface_hub/utils/_terminal.py | 177 | # Read the file descriptor directly: `sys.stdin.read(1)` would buffer the whole escape | COMMENT |
| LOW | src/huggingface_hub/utils/tqdm.py | 66 | # Check if enabling a subgroup affects the parent group | STRING |
| LOW | src/huggingface_hub/cli/upload.py | 225 | # Check if branch already exists and if not, create it | COMMENT |
| LOW | src/huggingface_hub/inference/_mcp/cli.py | 84 | # Check if the input is used by any server or as an apiKey | COMMENT |
| LOW | src/huggingface_hub/inference/_mcp/cli.py | 162 | # Check if we should exit | COMMENT |
| LOW | src/huggingface_hub/inference/_mcp/mcp_client.py | 238 | # Add tool to the list of available tools (for use in chat completions) | COMMENT |
| LOW | src/huggingface_hub/inference/_mcp/mcp_client.py | 378 | # Check if this is an exit loop tool | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_hf_api.py | 2674 | def _setup(self, tmp_path, mocker) -> None: | CODE |
| LOW⚡ | tests/test_xet_progress_reporting.py | 33 | def set_postfix_str(self, postfix: str, refresh: bool = False) -> None: | CODE |
| LOW⚡ | tests/test_repocard.py | 483 | def _setup(self) -> None: | STRING |
| LOW | tests/test_repocard.py | 191 | def _setup(self, tmp_path) -> None: | STRING |
| LOW⚡ | tests/test_commit_scheduler.py | 182 | def _setup(self, tmp_path) -> None: | CODE |
| LOW⚡ | tests/test_utils_errors.py | 130 | def _setup(self) -> None: | CODE |
| LOW | src/huggingface_hub/_upload_pipeline.py | 266 | def _update_speed(self) -> None: | CODE |
| LOW | src/huggingface_hub/_commit_scheduler.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/huggingface_hub/__init__.py | 650 | __all__ = [ | CODE |
| LOW | src/huggingface_hub/_local_folder.py | 63 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/huggingface_hub/_oauth.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/huggingface_hub/_login.py | 544 | def _set_store_as_git_credential_helper_globally() -> None: | CODE |
| LOW | src/huggingface_hub/dataclasses.py | 688 | __all__ = [ | CODE |
| LOW⚡ | src/huggingface_hub/_snapshot_download.py | 506 | def update_transfer(self, n: int | float | None = 1) -> None: | CODE |
| LOW⚡ | src/huggingface_hub/_snapshot_download.py | 509 | def set_postfix_str(self, postfix: str, refresh: bool = False) -> None: | CODE |
| LOW⚡ | src/huggingface_hub/_snapshot_download.py | 513 | def set_transfer_postfix_str(self, postfix: str, refresh: bool = False) -> None: | CODE |
| LOW | src/huggingface_hub/_hot_reload/sse_client.py | 19 | __all__ = ['SSEClient'] | CODE |
| LOW | src/huggingface_hub/serialization/_dduf.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/huggingface_hub/utils/_terminal.py | 74 | def set_enabled(cls, enabled: bool) -> None: | CODE |
| LOW | src/huggingface_hub/utils/logging.py | 122 | def set_verbosity(verbosity: int) -> None: | CODE |
| LOW | src/huggingface_hub/utils/_http.py | 372 | def set_client_factory(client_factory: CLIENT_FACTORY_T) -> None: | CODE |
| LOW | src/huggingface_hub/utils/_http.py | 389 | def set_async_client_factory(async_client_factory: ASYNC_CLIENT_FACTORY_T) -> None: | CODE |
| LOW | src/huggingface_hub/utils/_xet_progress_reporting.py | 21 | def _set_monotonic_total(bar, total: int | None) -> None: | CODE |
| LOW | src/huggingface_hub/utils/_xet_progress_reporting.py | 27 | def _update_transfer_bar(bar, inc: int) -> None: | CODE |
| LOW | src/huggingface_hub/utils/_xet_progress_reporting.py | 53 | def _set_aggregate_rate_postfix(bar) -> None: | CODE |
| LOW | src/huggingface_hub/utils/_xet_progress_reporting.py | 137 | def update_progress(self, group_report, _item_reports: dict | None = None) -> None: | CODE |
| LOW | src/huggingface_hub/utils/_auth.py | 57 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/huggingface_hub/utils/_git_credential.py | 55 | def set_git_credential(token: str, username: str = "hf_user", folder: str | None = None) -> None: | STRING |
| LOW | src/huggingface_hub/cli/_output.py | 65 | def set_mode(self, mode: OutputFormat = OutputFormat.auto) -> None: | CODE |
| LOW | src/huggingface_hub/cli/_output.py | 78 | def set_no_truncate(self, no_truncate: bool) -> None: | CODE |
| LOW | src/huggingface_hub/cli/_cli_utils.py | 41 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/huggingface_hub/cli/_cli_utils.py | 409 | def set_output_format(format: OutputFormat | None, json: bool, quiet: bool) -> None: | CODE |
| LOW | src/huggingface_hub/inference/_common.py | 53 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | src/huggingface_hub/inference/_common.py | 379 | def _set_unsupported_text_generation_kwargs(model: str | None, unsupported_kwargs: list[str]) -> None: | CODE |
| LOW | src/huggingface_hub/inference/_client.py | 116 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/huggingface_hub/inference/_mcp/mcp_client.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | …/huggingface_hub/inference/_generated/_async_client.py | 106 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_utils_dotenv.py | 1 | # AI-generated module (ChatGPT) | COMMENT |
| HIGH | utils/generate_cli_reference.py | 83 | Auto-generated code by Cursor. | STRING |
| HIGH | .github/workflows/release.yml | 10 | # draft GitHub release with AI-generated notes, and opens test branches in downstream repositories (transformers, | COMMENT |
| HIGH | .github/workflows/release.yml | 534 | # Archive the RAW AI-generated notes to the bucket now, before they are manually | COMMENT |
| HIGH | src/huggingface_hub/utils/_dotenv.py | 1 | # AI-generated module (ChatGPT) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_hf_file_system.py | 739 | # Copy the result to make it robust to the cache modifications | COMMENT |
| MEDIUM | src/huggingface_hub/hf_file_system.py | 242 | # make fs_token robust to default values and to kwargs order | COMMENT |
| MEDIUM | src/huggingface_hub/utils/tqdm.py | 101 | # Essentially, the environment variable's setting overrides any code-based configurations. | COMMENT |
| LOW | src/huggingface_hub/utils/_xet_progress_reporting.py | 257 | # Here we just use the defaults. | COMMENT |
| MEDIUM | src/huggingface_hub/utils/_detect_agent.py | 30 | More details: https://huggingface.co/docs/hub/agents-overview#register-your-agent-harness | STRING |
| MEDIUM | src/huggingface_hub/utils/_detect_agent.py | 93 | # No harness matched but a standard var is set => unrecognized agent. | COMMENT |
| MEDIUM | …ngface_hub/inference/_generated/types/text_to_audio.py | 46 | """Number of groups to divide num_beams into in order to ensure diversity among different | STRING |
| MEDIUM | …hub/inference/_generated/types/image_classification.py | 19 | """The function to apply to the model outputs in order to retrieve the scores.""" | STRING |
| MEDIUM | …ngface_hub/inference/_generated/types/image_to_text.py | 46 | """Number of groups to divide num_beams into in order to ensure diversity among different | STRING |
| MEDIUM | …hub/inference/_generated/types/audio_classification.py | 19 | """The function to apply to the model outputs in order to retrieve the scores.""" | STRING |
| MEDIUM | …hub/inference/_generated/types/video_classification.py | 21 | """The function to apply to the model outputs in order to retrieve the scores.""" | STRING |
| MEDIUM | …gface_hub/inference/_generated/types/text_to_speech.py | 46 | """Number of groups to divide num_beams into in order to ensure diversity among different | STRING |
| MEDIUM | …_hub/inference/_generated/types/text_classification.py | 19 | """The function to apply to the model outputs in order to retrieve the scores.""" | STRING |
| MEDIUM | …rence/_generated/types/automatic_speech_recognition.py | 46 | """Number of groups to divide num_beams into in order to ensure diversity among different | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | utils/check_hardware_flavors.py | 144 | # Step 1: find the enum class and its docstring. | COMMENT |
| LOW⚡ | utils/check_hardware_flavors.py | 157 | # Step 2: find where the enum body ends (next top-level class/def/decorator). | COMMENT |
| LOW⚡ | docs/source/en/guides/buckets.md | 712 | # Step 1: Generate a plan file (nothing is transferred) | COMMENT |
| LOW⚡ | docs/source/en/guides/buckets.md | 721 | # Step 2: Review the plan file (JSONL format) | COMMENT |
| LOW⚡ | docs/source/en/guides/buckets.md | 724 | # Step 3: Apply the plan | COMMENT |
| LOW⚡ | docs/source/en/guides/buckets.md | 731 | # Step 1: Generate a plan file (nothing is transferred) | COMMENT |
| LOW⚡ | docs/source/en/guides/buckets.md | 734 | # Step 2: Review the plan file (JSONL format), then apply | COMMENT |
| LOW⚡ | src/huggingface_hub/serialization/_dduf.py | 368 | # Step 1: Get the local file header offset | COMMENT |
| LOW⚡ | src/huggingface_hub/serialization/_dduf.py | 371 | # Step 2: Read the local file header | COMMENT |
| LOW⚡ | src/huggingface_hub/serialization/_dduf.py | 378 | # Step 3: Parse the header fields to calculate the start of file data | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | utils/check_hardware_flavors.py | 144 | # Step 1: find the enum class and its docstring. | COMMENT |
| LOW⚡ | utils/check_hardware_flavors.py | 157 | # Step 2: find where the enum body ends (next top-level class/def/decorator). | COMMENT |
| LOW⚡ | src/huggingface_hub/serialization/_dduf.py | 368 | # Step 1: Get the local file header offset | COMMENT |
| LOW⚡ | src/huggingface_hub/serialization/_dduf.py | 371 | # Step 2: Read the local file header | COMMENT |
| LOW⚡ | src/huggingface_hub/serialization/_dduf.py | 378 | # Step 3: Parse the header fields to calculate the start of file data | COMMENT |
| LOW | src/huggingface_hub/serialization/_torch.py | 940 | # We need to check if `xla_device` can be found, will raise a RuntimeError if not | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 82 | # Please make sure to update the list there when adding a new typing dependency. | COMMENT |
| LOW | .github/workflows/python-tests.yml | 158 | # Please make sure to keep it updated as well. | COMMENT |
| LOW | src/huggingface_hub/__init__.py | 29 | # mandatory to make sure to add them twice when adding one. This is checked in the | COMMENT |
| LOW | src/huggingface_hub/_local_folder.py | 246 | # make sure to have a cross-platform transcription | COMMENT |
| LOW | src/huggingface_hub/_local_folder.py | 278 | # make sure to have a cross-platform transcription | COMMENT |
| LOW | src/huggingface_hub/fastai_utils.py | 182 | Greetings fellow fastlearner 🤝! Don't forget to delete this content from your model card. | CODE |
| LOW | src/huggingface_hub/cli/spaces.py | 394 | print("PS: Dev mode stops after 48h of inactivity, don't forget to save your changes regularly.") | CODE |
| MEDIUM | src/huggingface_hub/inference/_providers/_common.py | 16 | # for a given Inference Provider, you can add it to the following dictionary. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_hf_api.py | 3797 | url = RepoUrl("https://huggingface.co/dummy_user/dummy_model") | STRING |
| LOW⚡ | tests/test_hf_api.py | 3798 | assert url.namespace == "dummy_user" | STRING |
| LOW⚡ | tests/test_hf_api.py | 3800 | assert url.repo_id == "dummy_user/dummy_model" | STRING |
| LOW | tests/test_hf_api.py | 3444 | self.api = HfApi(token="fake_token") | STRING |
| LOW⚡ | tests/test_cli.py | 2057 | patch("huggingface_hub.cli.auth.get_token", return_value="fake-token"), | CODE |
| LOW⚡ | tests/test_cli.py | 2068 | patch("huggingface_hub.cli.auth.get_token", return_value="fake-token"), | CODE |
| LOW | tests/test_cli.py | 2046 | patch("huggingface_hub.cli.auth.get_token", return_value="fake-token"), | CODE |
| LOW | src/huggingface_hub/hf_api.py | 530 | >>> RepoUrl('https://hub-ci.huggingface.co/datasets/dummy_user/dummy_dataset', endpoint='https://hub-ci.huggingface. | CODE |
| LOW | src/huggingface_hub/hf_api.py | 531 | RepoUrl('https://hub-ci.huggingface.co/datasets/dummy_user/dummy_dataset', endpoint='https://hub-ci.huggingface.co', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/huggingface_hub/utils/insecure_hashlib.py | 14 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/huggingface_hub/utils/_experimental.py | 44 | ... def my_function(): | STRING |