fs.put_file: don't require size to be passed

This commit is contained in:
Saugat Pachhai (सौगात)
2022-04-28 15:31:28 +05:45
committed by Saugat Pachhai
parent ae4f56c5ad
commit e30d2fdda5
+1 -1
View File
@@ -316,9 +316,9 @@ class FileSystem:
from_file: Union[AnyFSPath, IO],
to_info: AnyFSPath,
callback: FsspecCallback = DEFAULT_CALLBACK,
size: int = None,
**kwargs,
) -> None:
size = kwargs.pop("size", None)
if size:
callback.set_size(size)
if hasattr(from_file, "read"):