diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f82600950..bc15dd696f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.14.11' + rev: 'v0.14.13' hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] diff --git a/dvc/analytics.py b/dvc/analytics.py index 9884572431..1131352191 100644 --- a/dvc/analytics.py +++ b/dvc/analytics.py @@ -147,7 +147,7 @@ def _git_remote_path_hash(scm: Optional["Base"]) -> Optional[str]: path = _parse_git_remote_path(remote_url) h = hashlib.md5(path.encode("utf-8"), usedforsecurity=False) # for FIPS return h.hexdigest() - except Exception: # noqa: BLE001 + except Exception: logger.debug("Failed to get git remote path", exc_info=True) return None diff --git a/dvc/repo/experiments/collect.py b/dvc/repo/experiments/collect.py index a018d1b861..337827d5fe 100644 --- a/dvc/repo/experiments/collect.py +++ b/dvc/repo/experiments/collect.py @@ -58,7 +58,7 @@ def collect_rev( if not (rev == "workspace" or param_deps or data.contains_error): cache.put(data, force=True) return ExpState(rev=rev, data=data) - except Exception as exc: # noqa: BLE001 + except Exception as exc: logger.debug("", exc_info=True) error = SerializableError(str(exc), type(exc).__name__) return ExpState(rev=rev, error=error) diff --git a/dvc/repo/metrics/show.py b/dvc/repo/metrics/show.py index 62f0d401c3..98c76eb95f 100644 --- a/dvc/repo/metrics/show.py +++ b/dvc/repo/metrics/show.py @@ -123,7 +123,7 @@ def try_expand_paths(fs: "FileSystem", paths: Iterable[str]) -> Iterator[str]: if fs.isdir(path): yield from fs.find(path) continue - except Exception as e: # noqa: BLE001 + except Exception as e: logger.debug( "failed to expand %r: %s", path, diff --git a/tests/unit/test_logger.py b/tests/unit/test_logger.py index d478f1c5e1..f096622a4a 100644 --- a/tests/unit/test_logger.py +++ b/tests/unit/test_logger.py @@ -113,7 +113,7 @@ def test_exc_info_on_other_record_types(self, caplog, dt): with caplog.at_level(logging.DEBUG, logger="dvc"): try: raise Exception("description") - except Exception: # noqa: BLE001 + except Exception: stack_trace = traceback.format_exc() logger.debug("", exc_info=True)