From 7b4c734555d6885e2577f33790927c59ffda3f33 Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sun, 28 Jun 2026 23:31:57 +0800 Subject: [PATCH] fix: is_market_open_now always returns tuple for consistent caller handling Co-Authored-By: Claude --- entrypoints/cloud_run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoints/cloud_run.py b/entrypoints/cloud_run.py index 0b750d6..ec86977 100644 --- a/entrypoints/cloud_run.py +++ b/entrypoints/cloud_run.py @@ -16,7 +16,7 @@ def is_market_open_now(*, calendar_name="NYSE", timezone_name="America/New_York" now_market = datetime.now(market_tz) schedule = calendar.schedule(start_date=now_market.date(), end_date=now_market.date()) if schedule.empty: - return False - return calendar.open_at_time(schedule, now_market) + return False, None + return calendar.open_at_time(schedule, now_market), None except Exception as exc: return False, exc