huggingface_hub
55bb9ec9 - 🗑 Deprecate `token` in read-only methods of `HfApi` in favor of `use_auth_token` (#928)

Commit
3 years ago
🗑 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 * 🩹
Author
Parents
Loading