Skip to content

Commit a98ff0d

Browse files
authored
ruff: set pylint's max-args to 10 (#253)
1 parent 0ba7975 commit a98ff0d

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,6 @@ strict = true
178178

179179
[tool.ruff.lint.isort]
180180
known-first-party = ["dvc_objects"]
181+
182+
[tool.ruff.lint.pylint]
183+
max-args = 10

src/dvc_objects/db.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def add_bytes(self, oid: str, data: Union[bytes, BinaryIO]) -> None:
125125
path = self.oid_to_path(oid)
126126
self.fs.put_file(fobj, path, size=size)
127127

128-
def add( # noqa: PLR0913
128+
def add(
129129
self,
130130
path: Union["AnyFSPath", List["AnyFSPath"]],
131131
fs: "FileSystem",

src/dvc_objects/executors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
9393
return False
9494

9595

96-
async def batch_coros( # noqa: PLR0913, C901
96+
async def batch_coros( # noqa: C901
9797
coros: Sequence[Coroutine],
9898
batch_size: Optional[int] = None,
9999
callback: Optional[Callback] = None,

src/dvc_objects/fs/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def read_text(
289289
path, encoding=encoding, errors=errors, newline=newline, **kwargs
290290
)
291291

292-
def write_text( # noqa: PLR0913
292+
def write_text(
293293
self,
294294
path: AnyFSPath,
295295
value: str,
@@ -577,7 +577,7 @@ def du(
577577
) -> Union[int, Dict[AnyFSPath, int]]:
578578
return self.fs.du(path, total=total, maxdepth=maxdepth, **kwargs)
579579

580-
def put( # noqa: PLR0913
580+
def put(
581581
self,
582582
from_info: Union[AnyFSPath, List[AnyFSPath]],
583583
to_info: Union[AnyFSPath, List[AnyFSPath]],
@@ -605,7 +605,7 @@ def put( # noqa: PLR0913
605605
put_file = callback.wrap_and_branch(self.put_file)
606606
list(executor.imap_unordered(put_file, from_infos, to_infos))
607607

608-
def get( # noqa: PLR0913
608+
def get(
609609
self,
610610
from_info: Union[AnyFSPath, List[AnyFSPath]],
611611
to_info: Union[AnyFSPath, List[AnyFSPath]],

src/dvc_objects/fs/generic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _link(
6565
os.chmod(to_path, 0o666 & ~umask)
6666

6767

68-
def copy( # noqa: PLR0913
68+
def copy(
6969
from_fs: "FileSystem",
7070
from_path: Union["AnyFSPath", List["AnyFSPath"]],
7171
to_fs: "FileSystem",
@@ -129,7 +129,7 @@ def _copy_one(from_p: "AnyFSPath", to_p: "AnyFSPath"):
129129
list(executor.imap_unordered(_copy_one, from_path, to_path))
130130

131131

132-
def _put( # noqa: PLR0913
132+
def _put(
133133
from_paths: List["AnyFSPath"],
134134
to_fs: "FileSystem",
135135
to_paths: List["AnyFSPath"],
@@ -182,7 +182,7 @@ def _put_one(from_path: "AnyFSPath", to_path: "AnyFSPath"):
182182
list(executor.imap_unordered(_put_one, from_paths, to_paths))
183183

184184

185-
def _get( # noqa: PLR0913, C901
185+
def _get( # noqa: C901
186186
from_fs: "FileSystem",
187187
from_paths: List["AnyFSPath"],
188188
to_paths: List["AnyFSPath"],
@@ -245,7 +245,7 @@ async def _get_one_coro(from_path: "AnyFSPath", to_path: "AnyFSPath"):
245245
list(executor.imap_unordered(_get_one, from_paths, to_paths))
246246

247247

248-
def _try_links( # noqa: PLR0913
248+
def _try_links(
249249
links: List["str"],
250250
from_fs: "FileSystem",
251251
from_path: "AnyFSPath",
@@ -289,7 +289,7 @@ def _try_links( # noqa: PLR0913
289289
raise OSError(errno.ENOTSUP, "no more link types left to try out") from error
290290

291291

292-
def transfer( # noqa: PLR0912, PLR0913, C901,
292+
def transfer( # noqa: PLR0912, C901
293293
from_fs: "FileSystem",
294294
from_path: Union["AnyFSPath", List["AnyFSPath"]],
295295
to_fs: "FileSystem",

src/dvc_objects/fs/utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def makedirs(path, exist_ok: bool = False, mode: Optional[int] = None) -> None:
145145
)
146146

147147

148-
def _copyfile_with_pbar( # noqa: PLR0913
148+
def _copyfile_with_pbar(
149149
src: "AnyFSPath",
150150
dest: "AnyFSPath",
151151
total: int,
@@ -290,7 +290,7 @@ def exists(
290290
return results
291291

292292

293-
def _exist_query( # noqa: PLR0913
293+
def _exist_query(
294294
fs: "FileSystem",
295295
paths: Set["AnyFSPath"],
296296
paths_lock: threading.Lock,
@@ -312,7 +312,7 @@ def _exist_query( # noqa: PLR0913
312312
callback.relative_update()
313313

314314

315-
def _list_query( # noqa: PLR0913
315+
def _list_query(
316316
fs: "FileSystem",
317317
paths: Set["AnyFSPath"],
318318
paths_lock: threading.Lock,

0 commit comments

Comments
 (0)