From aec205773a27a4b3227e5a581408dd46a3112cdc Mon Sep 17 00:00:00 2001 From: Paul Tarjan Date: Fri, 26 Dec 2025 15:32:13 -0700 Subject: [PATCH] use bool --- pre_commit/commands/hook_impl.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pre_commit/commands/hook_impl.py b/pre_commit/commands/hook_impl.py index 85517ece..d792cd98 100644 --- a/pre_commit/commands/hook_impl.py +++ b/pre_commit/commands/hook_impl.py @@ -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(