Closed
Description
Currently, we use TypedDict
to represent some of the objects' attributes returned by the HfApi
methods. To be consistent, we should only use dataclasses
, as suggested in #1809 (comment):
I think we should open a separate PR to switch all of them (
BlobLfsInfo
,LastCommitInfo
,BlobSecurityInfo
,TransformersInfo
,SafeTensorsInfo
) to dataclasses, in a backward compatible way (and with a deprecation warning when dict-only method is used). This way we'll finally have a single type to represent data returned by the server (now that you've removed ReprMixin).
This work can be split in several PRs to make it easier to implement and review.