diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 32861d1d..a1fb4d1d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.14.10' + rev: 'v0.15.0' hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] diff --git a/src/dvc_data/hashfile/db/__init__.py b/src/dvc_data/hashfile/db/__init__.py index 861dfbf9..cb333d58 100644 --- a/src/dvc_data/hashfile/db/__init__.py +++ b/src/dvc_data/hashfile/db/__init__.py @@ -172,7 +172,7 @@ def check( assert actual.name == self.hash_name assert actual.value - if actual.value.split(".")[0] != oid.split(".")[0]: + if actual.value.split(".")[0] != oid.split(".", maxsplit=1)[0]: logger.debug("corrupted cache file '%s'.", obj.path) with suppress(FileNotFoundError): self.fs.remove(obj.path) diff --git a/src/dvc_data/index/index.py b/src/dvc_data/index/index.py index 01c55f42..c9223ae9 100644 --- a/src/dvc_data/index/index.py +++ b/src/dvc_data/index/index.py @@ -768,7 +768,7 @@ def _load_from_storage(trie, entry, storage_info): else: _load_from_file_storage(trie, entry, storage) return True - except Exception as exc: # noqa: BLE001 + except Exception as exc: # NOTE: this might be some random fs exception, e.g. auth error last_exc = exc logger.debug(