8000 Migrate typing for integrations - part 4 by sl0thentr0py · Pull Request #4533 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content

Migrate typing for integrations - part 4 #4533

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

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

sl0thentr0py
Copy link
Member

No description provided.

@sl0thentr0py sl0thentr0py requested a review from a team as a code owner June 27, 2025 13:55
@sl0thentr0py sl0thentr0py mentioned this pull request Jun 27, 2025
Copy link
codecov bot commented Jun 27, 2025

Codecov Report

Attention: Patch coverage is 99.03846% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.84%. Comparing base (e4ccd04) to head (8d33222).
Report is 2 commits behind head on neel/typing.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/integrations/strawberry.py 95.83% 1 Missing ⚠️
sentry_sdk/integrations/tornado.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           neel/typing    #4533       +/-   ##
================================================
+ Coverage        33.17%   84.84%   +51.67%     
================================================
  Files              144      144               
  Lines            14965    14973        +8     
  Branches          2374     2374               
================================================
+ Hits              4964    12704     +7740     
+ Misses            9514     1540     -7974     
- Partials           487      729      +242     
Files with missing lines Coverage Δ
sentry_sdk/integrations/sanic.py 82.96% <100.00%> (+74.12%) ⬆️
sentry_sdk/integrations/serverless.py 96.55% <100.00%> (+96.55%) ⬆️
sentry_sdk/integrations/socket.py 94.33% <100.00%> (+94.33%) ⬆️
sentry_sdk/integrations/sqlalchemy.py 70.88% <100.00%> (+60.62%) ⬆️
sentry_sdk/integrations/starlette.py 84.85% <100.00%> (+79.98%) ⬆️
sentry_sdk/integrations/starlite.py 81.94% <100.00%> (+74.95%) ⬆️
sentry_sdk/integrations/statsig.py 91.66% <100.00%> (+9.05%) ⬆️
sentry_sdk/integrations/stdlib.py 99.29% <100.00%> (+39.72%) ⬆️
sentry_sdk/integrations/sys_exit.py 100.00% <100.00%> (+100.00%) ⬆️
sentry_sdk/integrations/threading.py 92.18% <100.00%> (+19.17%) ⬆️
... and 6 more

... and 107 files with indirect coverage changes

Copy link
Contributor
@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See small comment, else lgtm

@sl0thentr0py sl0thentr0py force-pushed the neel/typing-integrations-4 branch from 730734d to 0474152 Compare June 30, 2025 10:39
@sl0thentr0py sl0thentr0py force-pushed the neel/typing-integrations-4 branch from 0474152 to 8d33222 Compare June 30, 2025 10:39
@sl0thentr0py sl0thentr0py merged commit 66d06f5 into neel/typing Jun 30, 2025
5 of 6 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/typing-integrations-4 branch June 30, 2025 10:39
sl0thentr0py added a commit that referenced this pull request Jun 30, 2025
extracted from
https://github.com/getsentry/sentry-python/pull/4487/files with lots of
manual fixes

* migrate old style `# type: bla` to inline types
* most importantly use
[`__future__.annotations`](https://peps.python.org/pep-0563/#enabling-the-future-behavior-in-python-3-7)
so that we can simply use forward annotations without wrapping them in
strings like we did before, this simplifies things substantially
* also guard only things that shouldn't be imported under
`TYPE_CHECKING`, in the future it seems we should avoid using
`TYPE_CHECKING` completely
* #4510
* #4522
* #4529
* #4530
* #4532
* #4533
* #4534

closes #2585
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 this pull request may close these issues.

2 participants
0