Skip to content

Commit f311ca6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 07496c5 commit f311ca6

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

dvc/fs/azure.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from dvc.utils import format_link
1313

1414
from ..progress import DEFAULT_CALLBACK
15-
from .fsspec_wrapper import ObjectFSWrapper, CallbackMixin
15+
from .fsspec_wrapper import CallbackMixin, ObjectFSWrapper
1616

1717
logger = logging.getLogger(__name__)
1818
_DEFAULT_CREDS_STEPS = (
@@ -165,4 +165,6 @@ def put_file(
165165
self, from_file, to_info, callback=DEFAULT_CALLBACK, **kwargs
166166
):
167167
# AzureFileSystem.put_file does not support callbacks yet.
168-
return CallbackMixin.put_file_compat(self, from_file, to_info, callback=callback, **kwargs)
168+
return CallbackMixin.put_file_compat(
169+
self, from_file, to_info, callback=callback, **kwargs
170+
)

dvc/fs/fsspec_wrapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ class CallbackMixin:
256256
if the target filesystem supports callbacks."""
257257

258258
@staticmethod
259-
def put_file_compat(fs, from_file, to_info, callback=DEFAULT_CALLBACK, **kwargs):
259+
def put_file_compat(
260+
fs, from_file, to_info, callback=DEFAULT_CALLBACK, **kwargs
261+
):
260262
"""Add compatibility support for Callback."""
261263
fs.makedirs(to_info.parent)
262264
size = os.path.getsize(from_file)

dvc/fs/gs.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
from dvc.path_info import CloudURLInfo
77
from dvc.scheme import Schemes
88

9-
from .fsspec_wrapper import ObjectFSWrapper, CallbackMixin
10-
119
# pylint:disable=abstract-method
1210
from ..progress import DEFAULT_CALLBACK
11+
from .fsspec_wrapper import CallbackMixin, ObjectFSWrapper
1312

1413

1514
class GSFileSystem(ObjectFSWrapper):
@@ -38,6 +37,10 @@ def fs(self):
3837

3938
return GCSFileSystem(**self.fs_args)
4039

41-
def put_file(self, from_file, to_info, callback=DEFAULT_CALLBACK, **kwargs):
40+
def put_file(
41+
self, from_file, to_info, callback=DEFAULT_CALLBACK, **kwargs
42+
):
4243
# GCSFileSystem.put_file does not support callbacks yet.
43-
return CallbackMixin.put_file_compat(self, from_file, to_info, callback=callback, **kwargs)
44+
return CallbackMixin.put_file_compat(
45+
self, from_file, to_info, callback=callback, **kwargs
46+
)

0 commit comments

Comments
 (0)