diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad3b4b58..d4126299 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,13 +20,13 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.15.2' + rev: 'v0.17.3' hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.3 hooks: - id: codespell additional_dependencies: ["tomli"] diff --git a/src/dvc_data/callbacks.py b/src/dvc_data/callbacks.py index c9ea810e..3b4a5048 100644 --- a/src/dvc_data/callbacks.py +++ b/src/dvc_data/callbacks.py @@ -44,6 +44,10 @@ class Tqdm(tqdm): "miniters": 1, } + # always set in __init__, narrower than tqdm's `str | Mapping | None` + postfix: dict[str, Any] + bar_format: str + def __init__( self, iterable=None, diff --git a/src/dvc_data/hashfile/checkout.py b/src/dvc_data/hashfile/checkout.py index 6c4d8a5b..4b0b2d64 100644 --- a/src/dvc_data/hashfile/checkout.py +++ b/src/dvc_data/hashfile/checkout.py @@ -355,7 +355,7 @@ def _checkout( # noqa: C901 raise CheckoutError(failed) -def checkout( # noqa: PLR0913 +def checkout( # noqa: PLR0913, PLR0917 path: str, fs: "FileSystem", obj: Union["HashFile", "Tree"], diff --git a/src/dvc_data/hashfile/transfer.py b/src/dvc_data/hashfile/transfer.py index 80f2facc..301a435b 100644 --- a/src/dvc_data/hashfile/transfer.py +++ b/src/dvc_data/hashfile/transfer.py @@ -172,7 +172,7 @@ def _error(oid: str, exc: BaseException): return failed -def transfer( # noqa: PLR0913 +def transfer( # noqa: PLR0913, PLR0917 src: "HashFileDB", dest: "HashFileDB", obj_ids: Iterable["HashInfo"], diff --git a/src/dvc_data/index/checkout.py b/src/dvc_data/index/checkout.py index 8594d506..07b01c6b 100644 --- a/src/dvc_data/index/checkout.py +++ b/src/dvc_data/index/checkout.py @@ -67,7 +67,7 @@ def _delete_files( fs.remove([fs.join(path, *(entry.key or ())) for entry in entries]) -def _create_files( # noqa: C901, PLR0912, PLR0913 +def _create_files( # noqa: C901, PLR0912, PLR0913, PLR0917 entries, index: Optional["BaseDataIndex"], path: str,