Skip to content

Commit

Permalink
Update token type definition and arg description in `hf_file_system.p…
Browse files Browse the repository at this point in the history
…y` (#2278)

* docs: update token type definition and arg description in `hf_file_system.py`

* Update src/huggingface_hub/hf_file_system.py

---------

Co-authored-by: Lucain <lucainp@gmail.com>
  • Loading branch information
lappemic and Wauplin committed May 22, 2024
1 parent 5cf177d commit a6fbf16
Showing 1 changed file with 6 additions and 3 deletions.
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 (`str` or `bool`, *optional*):
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

0 comments on commit a6fbf16

Please sign in to comment.