From 37a934cfa96d4dec7581e648dc3043cb899bcc20 Mon Sep 17 00:00:00 2001 From: Rajat Ahuja Date: Mon, 30 Jun 2025 13:46:11 -0400 Subject: [PATCH] bugfix: avoid runtime NameError by using string annotations for Event and Hint --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index d6914027..2cb581f1 100644 --- a/src/main.py +++ b/src/main.py @@ -68,7 +68,7 @@ async def setup_admin_jwt(): SENTRY_ENABLED = settings.SENTRY.ENABLED if SENTRY_ENABLED: - def before_send(event: Event, hint: Hint) -> Event | None: + def before_send(event: "Event", hint: "Hint") -> "Event | None": if "exc_info" in hint: _, exc_value, _ = hint["exc_info"] # Filter out HonchoExceptions from being sent to Sentry