Skip to content

fix linter issue #7797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dvc/fs/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ def info(self, path, **kwargs):
ret["type"] = "directory"
return ret

def get_file(self, rpath, lpath, callback=DEFAULT_CALLBACK, **kwargs):
def get_file( # pylint: disable=arguments-differ
self, rpath, lpath, callback=DEFAULT_CALLBACK, **kwargs
):
fs, path = self._get_fs_path(rpath)
fs.get_file( # pylint: disable=protected-access
path, lpath, callback=callback, **kwargs
)
fs.get_file(path, lpath, callback=callback, **kwargs)

def checksum(self, path):
info = self.info(path)
Expand Down
13 changes: 5 additions & 8 deletions dvc/fs/dvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,22 +375,19 @@ def _func(fname):

return infos

def get_file(self, rpath, lpath, callback=DEFAULT_CALLBACK, **kwargs):
def get_file( # pylint: disable=arguments-differ
self, rpath, lpath, callback=DEFAULT_CALLBACK, **kwargs
):
fs, fs_path, dvc_fs, dvc_path = self._get_fs_pair(rpath)

if fs:
try:
fs.get_file( # pylint: disable=protected-access
fs_path, lpath, callback=callback, **kwargs
)
fs.get_file(fs_path, lpath, callback=callback, **kwargs)
return
except FileNotFoundError:
if not dvc_fs:
raise

dvc_fs.get_file( # pylint: disable=protected-access
dvc_path, lpath, callback=callback, **kwargs
)
dvc_fs.get_file(dvc_path, lpath, callback=callback, **kwargs)

def info(self, path, **kwargs):
fs, fs_path, dvc_fs, dvc_path = self._get_fs_pair(path)
Expand Down