Skip to content

Commit

Permalink
🚚 Proposal: use_auth_token for read only HfApi methods
Browse files Browse the repository at this point in the history
This PR deprecates the `token` argument in read-only methods of `HfApi`
in favor of `use_auth_token`.

`use_auth_token` is more flexible as it allows not passing a token,
whereas `token=None` fetches the token from `HfFolder`.

I personally prefer the semantics of `use_auth_token`, that I find very legible:
- `use_auth_token=False`
- `use_auth_token="token"`
- `use_auth_token=True`

cc @lhoestq
  • Loading branch information
SBrandeis committed Sep 8, 2022
1 parent 8e5f219 commit 9fb5886
Showing 1 changed file with 134 additions and 184 deletions.
Loading

0 comments on commit 9fb5886

Please sign in to comment.