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

Set Event to something other than None at runtime #2926

Closed
szokeasaurusrex opened this issue Apr 2, 2024 · 0 comments · Fixed by #2928
Closed

Set Event to something other than None at runtime #2926

szokeasaurusrex opened this issue Apr 2, 2024 · 0 comments · Fixed by #2928
Assignees

Comments

@szokeasaurusrex
Copy link
Member

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.44.0

Steps to Reproduce

See #2909 (comment). Simply running the code (i.e. with python not pytest) also causes the problem.

Expected Result

No error

Actual Result

TypeError: unsupported operand type(s) for |: 'NoneType' and 'NoneType'
@szokeasaurusrex szokeasaurusrex self-assigned this Apr 2, 2024
szokeasaurusrex added a commit that referenced this issue Apr 2, 2024
Change Event's runtime value to typing.Any, since the previous value of None caused the expression Event | None to result in a TypeError at runtime, even when the Event | None expression was used as a type hint. Also, add a test to make sure we don't reintroduce this bug.

Fixes GH-2926
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant