-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🗑 Deprecate
token
in read-only methods of HfApi
in favor of `use_…
…auth_token` (#928) * 🚚 Proposal: `use_auth_token` for read only `HfApi` methods 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 * 🔊 Deprecate in 0.12 * ♻ factorization * ✅ Update unit tests to ensure a warning is raised * 🎨 Smol typing fix * 💄 Code format * 🩹
- Loading branch information
Showing
9 changed files
with
157 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters