Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lucain <[email protected]>
  • Loading branch information
mariosasko and Wauplin authored Dec 15, 2023
1 parent b97d56b commit a3911e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/huggingface_hub/_commit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ def _fetch_lfs_files_to_copy(
repo_type=repo_type,
)
for src_repo_file in src_repo_files:
assert isinstance(src_repo_file, RepoFile)
if isinstance(src_repo_file, RepoFolder):
raise NotImplementedError("Copying a folder is not implemented.")
if not src_repo_file.lfs:
raise NotImplementedError("Copying a non-LFS file is not implemented")
files_to_copy[(src_repo_file.rfilename, src_revision)] = src_repo_file
Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,7 @@ def file_exists(
return False

@validate_hf_hub_args
@_deprecate_method(version="1.0", message="Use `list_repo_tree` and `get_paths_info` instead.")
@_deprecate_method(version="0.23", message="Use `list_repo_tree` and `get_paths_info` instead.")
def list_files_info(
self,
repo_id: str,
Expand Down

0 comments on commit a3911e5

Please sign in to comment.