mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 07:18:28 +01:00
fs.put_file: fix function signature for size
This commit is contained in:
committed by
Saugat Pachhai
parent
e30d2fdda5
commit
127a9c74b2
+4
-1
@@ -144,10 +144,13 @@ class HTTPFileSystem(FileSystem):
|
||||
from_file: Union[AnyFSPath, IO],
|
||||
to_info: AnyFSPath,
|
||||
callback: FsspecCallback = DEFAULT_CALLBACK,
|
||||
size: int = None,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
kwargs.setdefault("method", self.upload_method)
|
||||
super().put_file(from_file, to_info, callback=callback, **kwargs)
|
||||
super().put_file(
|
||||
from_file, to_info, callback=callback, size=size, **kwargs
|
||||
)
|
||||
|
||||
# pylint: disable=arguments-differ
|
||||
|
||||
|
||||
+9
-2
@@ -127,7 +127,14 @@ class SSHFileSystem(FileSystem):
|
||||
super().upload_fobj(fobj, tmp_file, **kwargs)
|
||||
|
||||
def put_file(
|
||||
self, from_file, to_info, callback=DEFAULT_CALLBACK, **kwargs
|
||||
self,
|
||||
from_file,
|
||||
to_info,
|
||||
callback=DEFAULT_CALLBACK,
|
||||
size=None,
|
||||
**kwargs,
|
||||
):
|
||||
with as_atomic(self, to_info) as tmp_file:
|
||||
super().put_file(from_file, tmp_file, callback=callback, **kwargs)
|
||||
super().put_file(
|
||||
from_file, tmp_file, callback=callback, size=size, **kwargs
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user