Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HfFileSystem] Fix glob with pattern without wildcards #2056

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Feb 28, 2024

It was reported in huggingface/datasets#6687

This is currently impacting datasets and DVC folks (preventing to use the latest fsspec versions) so it would be great to have a patch release once it's merged

@@ -557,7 +557,7 @@ def info(self, path: str, refresh: bool = False, revision: Optional[str] = None,
def exists(self, path, **kwargs):
"""Is there a file at the given path"""
try:
self.info(path, expand_info=False, **kwargs)
self.info(path, **{**kwargs, "expand_info": False})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing a TypeError: huggingface_hub.hf_file_system.HfFileSystem.info() got multiple values for keyword argument 'expand_info'

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.70%. Comparing base (86fa26d) to head (9afc97e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2056      +/-   ##
==========================================
+ Coverage   80.36%   80.70%   +0.34%     
==========================================
  Files          71       71              
  Lines        8519     8519              
==========================================
+ Hits         6846     6875      +29     
+ Misses       1673     1644      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@Wauplin Wauplin merged commit e7f243c into main Feb 28, 2024
16 checks passed
@Wauplin Wauplin deleted the fix-glob-no-magic branch February 28, 2024 15:43
Wauplin pushed a commit that referenced this pull request Feb 28, 2024
@Wauplin
Copy link
Contributor

Wauplin commented Feb 28, 2024

@lhoestq
Copy link
Member Author

lhoestq commented Feb 28, 2024

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants