From 8058e01834233bb56e575f46c2213bec64ffd83f Mon Sep 17 00:00:00 2001 From: kshitij Date: Thu, 23 Jul 2026 16:46:40 +0500 Subject: [PATCH] refactor: dedupe check_info call + fix trailing whitespace in doctor Hoist the duplicated check_info(source_id) call out of both if/else branches into a single call after the branch. Remove trailing whitespace on the blank line after the except block. Follow-up cleanup for PR #69981. --- hermes_cli/doctor.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hermes_cli/doctor.py b/hermes_cli/doctor.py index 3a372cc4ed23..e995178d119a 100644 --- a/hermes_cli/doctor.py +++ b/hermes_cli/doctor.py @@ -761,15 +761,12 @@ def run_doctor(args): "(new shared DBs use DELETE; prefer 3.51.3+ / 3.50.7 / 3.44.6 — " "see https://sqlite.org/wal.html#walresetbug)", ) - if _sqlite_src_short: - check_info(f"SQLite source id: {_sqlite_src_short}") else: check_ok(f"SQLite {_sqlite_ver}") - if _sqlite_src_short: - check_info(f"SQLite source id: {_sqlite_src_short}") + if _sqlite_src_short: + check_info(f"SQLite source id: {_sqlite_src_short}") except Exception as e: check_warn(f"SQLite version probe failed: {e}") - # Check if in virtual environment in_venv = sys.prefix != sys.base_prefix if in_venv: