Skip to content
Prev Previous commit
Next Next commit
use bool
  • Loading branch information
ptarjan committed Dec 26, 2025
commit aec205773a27a4b3227e5a581408dd46a3112cdc
10 changes: 4 additions & 6 deletions pre_commit/commands/hook_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,10 @@ def _ns(


def _rev_exists(rev: str) -> bool:
return not (
not subprocess.call(
('git', 'cat-file', '-e', rev),
stderr=subprocess.DEVNULL,
)
)
return not bool(subprocess.call(
('git', 'cat-file', '-e', rev),
stderr=subprocess.DEVNULL,
))


def _pre_push_ns(
Expand Down
Loading