From 4c4ceb2e610965d41b05782a2d6cbe4a329783fb Mon Sep 17 00:00:00 2001 From: ruoyeruolan Date: Tue, 1 Apr 2025 18:02:57 +0800 Subject: [PATCH 1/3] add positional argument --- fsspec/implementations/local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsspec/implementations/local.py b/fsspec/implementations/local.py index 619ea1d00..cab469bbf 100644 --- a/fsspec/implementations/local.py +++ b/fsspec/implementations/local.py @@ -154,7 +154,7 @@ def get_file(self, path1, path2, callback=None, **kwargs): def put_file(self, path1, path2, callback=None, **kwargs): return self.cp_file(path1, path2, **kwargs) - def mv(self, path1, path2, **kwargs): + def mv(self, path1, path2, recursive: bool = True, **kwargs): path1 = self._strip_protocol(path1) path2 = self._strip_protocol(path2) shutil.move(path1, path2) From 62000c4237a92f148e7e966854a270f2188a2f44 Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Thu, 3 Apr 2025 11:44:10 -0400 Subject: [PATCH 2/3] Update fsspec/implementations/local.py --- fsspec/implementations/local.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fsspec/implementations/local.py b/fsspec/implementations/local.py index cab469bbf..f63763496 100644 --- a/fsspec/implementations/local.py +++ b/fsspec/implementations/local.py @@ -155,6 +155,11 @@ def put_file(self, path1, path2, callback=None, **kwargs): return self.cp_file(path1, path2, **kwargs) def mv(self, path1, path2, recursive: bool = True, **kwargs): + """Move files/directories + + For the specific case of local, all ops on directories are recursive and + the recursive= kwarg is ignored. + """ path1 = self._strip_protocol(path1) path2 = self._strip_protocol(path2) shutil.move(path1, path2) From ae42441347d03f262c88b493adc8fc184dee4074 Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Thu, 3 Apr 2025 11:46:03 -0400 Subject: [PATCH 3/3] Update fsspec/implementations/local.py --- fsspec/implementations/local.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fsspec/implementations/local.py b/fsspec/implementations/local.py index f63763496..ee2995d63 100644 --- a/fsspec/implementations/local.py +++ b/fsspec/implementations/local.py @@ -156,7 +156,6 @@ def put_file(self, path1, path2, callback=None, **kwargs): def mv(self, path1, path2, recursive: bool = True, **kwargs): """Move files/directories - For the specific case of local, all ops on directories are recursive and the recursive= kwarg is ignored. """