Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Define types at runtime #2914

Merged
merged 5 commits into from
Mar 27, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion sentry_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from sentry_sdk._types import Event, Hint # noqa: F401
from sentry_sdk._types import Event, Hint

Check warning on line 14 in sentry_sdk/types.py

View check run for this annotation

Codecov / codecov/patch

sentry_sdk/types.py#L14

Added line #L14 was not covered by tests
else:
# The lines below allow the types to be imported from outside `if TYPE_CHECKING`
# guards. The types in this module are only intended to be used for type hints.
Event = None
Hint = None

Check warning on line 19 in sentry_sdk/types.py

View check run for this annotation

Codecov / codecov/patch

sentry_sdk/types.py#L18-L19

Added lines #L18 - L19 were not covered by tests

__all__ = ("Event", "Hint")

Check warning on line 21 in sentry_sdk/types.py

View check run for this annotation

Codecov / codecov/patch

sentry_sdk/types.py#L21

Added line #L21 was not covered by tests
Loading