class HackyCommitOperationAdd(CommitOperationAdd):
    def __post_init__(self) -> None:
        if isinstance(self.path_or_fileobj, Path):
            self.path_or_fileobj = str(self.path_or_fileobj)
/Users/nielsrogge/Documents/python_projecten/huggingface_hub/src/huggingface_hub/_upload_large_folder.py