[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2025-03-14 16:26:39 +00:00
parent 6c87f31a79
commit 311eeac592

View file

@ -115,7 +115,7 @@ def _rev_exists(rev: str) -> bool:
def _is_ancestor(ancestor: str, rev: str): def _is_ancestor(ancestor: str, rev: str):
return not subprocess.call( return not subprocess.call(
('git', 'merge-base', '--is-ancestor', ancestor, rev) ('git', 'merge-base', '--is-ancestor', ancestor, rev),
) )
@ -133,7 +133,7 @@ def _pre_push_ns(
if local_sha == Z40: if local_sha == Z40:
continue continue
elif remote_sha != Z40 and _rev_exists(remote_sha) \ elif remote_sha != Z40 and _rev_exists(remote_sha) \
and _is_ancestor(remote_sha, local_sha): and _is_ancestor(remote_sha, local_sha):
return _ns( return _ns(
'pre-push', color, 'pre-push', color,
from_ref=remote_sha, to_ref=local_sha, from_ref=remote_sha, to_ref=local_sha,