huggingface_hub
3bf0a78f - restrict run_as_future to Literal[False] in dry_run overloads

Commit
30 days ago
restrict run_as_future to Literal[False] in dry_run overloads When dry_run=True, run_as_future=True makes no sense (dry run is purely local), and the return type would be silently wrapped in a Future by @future_compatible, mismatching the overload's declared DryRunUploadInfo return type. Restrict both upload_file and upload_folder dry-run overloads to run_as_future: Literal[False] so the type system prevents this combination. Co-authored-by: célina <hanouticelina@users.noreply.github.com>
References
Author
Parents
Loading