From 4eff870b98ce2a43c4fa2920d3d0d0aef126066c Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Fri, 15 Mar 2024 15:49:34 +0100 Subject: [PATCH 1/2] Re-export `Event` in `types.py` --- sentry_sdk/types.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sentry_sdk/types.py diff --git a/sentry_sdk/types.py b/sentry_sdk/types.py new file mode 100644 index 0000000000..cab834d91a --- /dev/null +++ b/sentry_sdk/types.py @@ -0,0 +1,14 @@ +""" +This module contains type definitions for the Sentry SDK's public API. +The types are re-exported from the internal module `sentry_sdk._types`. + +Disclaimer: Since types are a form of documentation, type definitions +may change in minor releases. Removing a type would be considered a +breaking change, and so we will only remove type definitions in major +releases. +""" + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from sentry_sdk._types import Event # noqa: F401 From aef1af23d1085ae462e8773b2c3e569063805c85 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Mon, 18 Mar 2024 09:09:19 +0100 Subject: [PATCH 2/2] Re-export `Hint` in `types.py` --- sentry_sdk/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_sdk/types.py b/sentry_sdk/types.py index cab834d91a..5c46de7f88 100644 --- a/sentry_sdk/types.py +++ b/sentry_sdk/types.py @@ -11,4 +11,4 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: - from sentry_sdk._types import Event # noqa: F401 + from sentry_sdk._types import Event, Hint # noqa: F401