Skip to content

Commit

Permalink
pylint: fix 2.9.6 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla authored and mergify-bot committed Aug 2, 2021
1 parent 7c3f656 commit 06ce30e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions dvc/fs/dvc.py
Expand Up @@ -99,14 +99,14 @@ def open( # type: ignore
cache_path = out.cache_path
return open(cache_path, mode=mode, encoding=encoding)

def exists(self, path): # pylint: disable=arguments-differ
def exists(self, path): # pylint: disable=arguments-renamed
try:
self.metadata(path)
return True
except FileNotFoundError:
return False

def isdir(self, path): # pylint: disable=arguments-differ
def isdir(self, path): # pylint: disable=arguments-renamed
try:
meta = self.metadata(path)
return meta.isdir
Expand All @@ -129,7 +129,7 @@ def check_isdir(self, path_info, outs):
except FileNotFoundError:
return True

def isfile(self, path): # pylint: disable=arguments-differ
def isfile(self, path): # pylint: disable=arguments-renamed
try:
meta = self.metadata(path)
return meta.isfile
Expand Down
4 changes: 2 additions & 2 deletions dvc/fs/git.py
Expand Up @@ -36,8 +36,8 @@ def _get_key(self, path):
return tuple(relparts)

def open(
self, path, mode="r", encoding=None
): # pylint: disable=arguments-differ
self, path, mode="r", encoding=None, **kwargs
): # pylint: disable=arguments-renamed
# NOTE: this is incorrect, we need to use locale to determine default
# encoding.
encoding = encoding or "utf-8"
Expand Down
6 changes: 3 additions & 3 deletions dvc/fs/repo.py
Expand Up @@ -136,7 +136,7 @@ def _get_fs_pair(

def open(
self, path, mode="r", encoding="utf-8", **kwargs
): # pylint: disable=arguments-differ
): # pylint: disable=arguments-renamed
if "b" in mode:
encoding = None

Expand Down Expand Up @@ -173,7 +173,7 @@ def exists(self, path_info) -> bool:

return True

def isdir(self, path): # pylint: disable=arguments-differ
def isdir(self, path): # pylint: disable=arguments-renamed
fs, dvc_fs = self._get_fs_pair(path)

if dvc_fs and dvc_fs.repo.dvcignore.is_ignored_dir(path):
Expand Down Expand Up @@ -204,7 +204,7 @@ def isdvc(self, path, **kwargs):
_, dvc_fs = self._get_fs_pair(path)
return dvc_fs is not None and dvc_fs.isdvc(path, **kwargs)

def isfile(self, path): # pylint: disable=arguments-differ
def isfile(self, path): # pylint: disable=arguments-renamed
fs, dvc_fs = self._get_fs_pair(path)

if dvc_fs and dvc_fs.repo.dvcignore.is_ignored_file(path):
Expand Down
2 changes: 1 addition & 1 deletion dvc/fs/ssh.py
Expand Up @@ -4,7 +4,7 @@

from funcy import cached_property, first, memoize, silent, wrap_prop, wrap_with

import dvc.prompt as prompt
from dvc import prompt
from dvc.scheme import Schemes
from dvc.utils.fs import as_atomic

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/utils/test_http.py
Expand Up @@ -49,8 +49,8 @@ def test_open_url_peek_rb(tmp_path, monkeypatch, http):

with open_url((http / "sample.txt").url, mode="rb") as fd:
text = text.encode("utf8")
assert fd.peek(len(text)) == text
assert fd.peek(len(text)) == text # pylint: disable=no-member
assert read_nbytes(fd, len(text), mode="rb") == text
assert fd.peek(len(text)) == text
assert fd.peek(len(text)) == text # pylint: disable=no-member
assert fd.read() == text
assert fd.read() == b""

0 comments on commit 06ce30e

Please sign in to comment.