From ddf70fb9ab1fee50e8fc0a9d804a83b36ae9c818 Mon Sep 17 00:00:00 2001 From: Umesh Unnikrishnan Date: Wed, 6 May 2026 11:46:52 -0700 Subject: [PATCH] Fix prompt_filter.py crash on Python < 3.10 (macOS) Add from __future__ import annotations to make PEP 604 union syntax (str | None) compatible with Python 3.7+. Fixes silent hook failure on macOS where Apple system python3 is 3.9.6. Closes #27 .... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-Authored-By: Cortex Code --- plugins/cortex-code/scripts/router/prompt_filter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/cortex-code/scripts/router/prompt_filter.py b/plugins/cortex-code/scripts/router/prompt_filter.py index 0d0a3ef..a9e337d 100644 --- a/plugins/cortex-code/scripts/router/prompt_filter.py +++ b/plugins/cortex-code/scripts/router/prompt_filter.py @@ -5,6 +5,7 @@ and if matched, prints a routing instruction to stdout that gets injected into the conversation context. Runs in <50ms -- no LLM calls, no network. """ +from __future__ import annotations import sys import re