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

Update token type definition and arg description in hf_file_system.py #2278

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/huggingface_hub/hf_file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ class HfFileSystem(fsspec.AbstractFileSystem):
Access a remote Hugging Face Hub repository as if were a local file system.

Args:
token (`str`, *optional*):
Authentication token, obtained with [`HfApi.login`] method. Will default to the stored token.
token (Union[bool, str, None], optional):
Wauplin marked this conversation as resolved.
Show resolved Hide resolved
A valid user access token (string). Defaults to the locally saved
token, which is the recommended method for authentication (see
https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
To disable authentication, pass `False`.

Usage:

Expand Down Expand Up @@ -105,7 +108,7 @@ def __init__(
self,
*args,
endpoint: Optional[str] = None,
token: Optional[str] = None,
token: Union[bool, str, None] = None,
**storage_options,
):
super().__init__(*args, **storage_options)
Expand Down
Loading