mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
[pre-commit.ci] pre-commit autoupdate (#10975)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@ repos:
|
|||||||
- id: sort-simple-yaml
|
- id: sort-simple-yaml
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: 'v0.14.11'
|
rev: 'v0.14.13'
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
args: [--fix, --exit-non-zero-on-fix]
|
args: [--fix, --exit-non-zero-on-fix]
|
||||||
|
|||||||
+1
-1
@@ -147,7 +147,7 @@ def _git_remote_path_hash(scm: Optional["Base"]) -> Optional[str]:
|
|||||||
path = _parse_git_remote_path(remote_url)
|
path = _parse_git_remote_path(remote_url)
|
||||||
h = hashlib.md5(path.encode("utf-8"), usedforsecurity=False) # for FIPS
|
h = hashlib.md5(path.encode("utf-8"), usedforsecurity=False) # for FIPS
|
||||||
return h.hexdigest()
|
return h.hexdigest()
|
||||||
except Exception: # noqa: BLE001
|
except Exception:
|
||||||
logger.debug("Failed to get git remote path", exc_info=True)
|
logger.debug("Failed to get git remote path", exc_info=True)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ def collect_rev(
|
|||||||
if not (rev == "workspace" or param_deps or data.contains_error):
|
if not (rev == "workspace" or param_deps or data.contains_error):
|
||||||
cache.put(data, force=True)
|
cache.put(data, force=True)
|
||||||
return ExpState(rev=rev, data=data)
|
return ExpState(rev=rev, data=data)
|
||||||
except Exception as exc: # noqa: BLE001
|
except Exception as exc:
|
||||||
logger.debug("", exc_info=True)
|
logger.debug("", exc_info=True)
|
||||||
error = SerializableError(str(exc), type(exc).__name__)
|
error = SerializableError(str(exc), type(exc).__name__)
|
||||||
return ExpState(rev=rev, error=error)
|
return ExpState(rev=rev, error=error)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ def try_expand_paths(fs: "FileSystem", paths: Iterable[str]) -> Iterator[str]:
|
|||||||
if fs.isdir(path):
|
if fs.isdir(path):
|
||||||
yield from fs.find(path)
|
yield from fs.find(path)
|
||||||
continue
|
continue
|
||||||
except Exception as e: # noqa: BLE001
|
except Exception as e:
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"failed to expand %r: %s",
|
"failed to expand %r: %s",
|
||||||
path,
|
path,
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class TestColorFormatter:
|
|||||||
with caplog.at_level(logging.DEBUG, logger="dvc"):
|
with caplog.at_level(logging.DEBUG, logger="dvc"):
|
||||||
try:
|
try:
|
||||||
raise Exception("description")
|
raise Exception("description")
|
||||||
except Exception: # noqa: BLE001
|
except Exception:
|
||||||
stack_trace = traceback.format_exc()
|
stack_trace = traceback.format_exc()
|
||||||
logger.debug("", exc_info=True)
|
logger.debug("", exc_info=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user