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

Skip to content

Migrate typing for integrations - part 3 #4532

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 2 commits 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:19
@sl0thentr0py sl0thentr0py mentioned this pull request Jun 27, 2025
Copy link
codecov bot commented Jun 27, 2025

Codecov Report

Attention: Patch coverage is 96.02273% with 14 lines in your changes missing coverage. Please review.

Project coverage is 84.84%. Comparing base (25d47bd) to head (c98ca0b).
Report is 2 commits behind head on neel/typing.

❌ Unsupported file format

Upload processing failed due to unsupported file format. Please review the parser error message:
Error parsing JUnit XML in /home/runner/work/sentry-python/sentry-python/.junitxml at 1:1767

Caused by:
RuntimeError: Error parsing XML

Caused by:
    0: ill-formed document: close tag `</testsuite>` does not match any open tag
    1: close tag `&lt;/testsuite&gt;` does not match any open tag</code></pre>

For more help, visit our troubleshooting guide.

Files with missing lines Patch % Lines
sentry_sdk/integrations/gcp.py 0.00% 9 Missing ⚠️
sentry_sdk/integrations/clickhouse_driver.py 64.28% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           neel/typing    #4532   +/-   ##
============================================
  Coverage        84.84%   84.84%           
============================================
  Files              144      144           
  Lines            14938    14965   +27     
  Branches          2371     2374    +3     
============================================
+ Hits             12674    12697   +23     
- Misses            1539     1540    +1     
- Partials           725      728    +3     
Files with missing lines Coverage Δ
sentry_sdk/integrations/chalice.py 97.10% <100.00%> (+0.04%) ⬆️
sentry_sdk/integrations/cloud_resource_context.py 91.09% <100.00%> (+0.06%) ⬆️
sentry_sdk/integrations/cohere.py 79.16% <100.00%> (+0.17%) ⬆️
sentry_sdk/integrations/dedupe.py 87.87% <100.00%> (+0.37%) ⬆️
sentry_sdk/integrations/dramatiq.py 83.95% <100.00%> (+0.20%) ⬆️
sentry_sdk/integrations/excepthook.py 78.78% <100.00%> (+0.66%) ⬆️
sentry_sdk/integrations/executing.py 69.23% <100.00%> (+0.80%) ⬆️
sentry_sdk/integrations/falcon.py 91.37% <100.00%> (+0.07%) ⬆️
sentry_sdk/integrations/fastapi.py 89.28% <100.00%> (+0.12%) ⬆️
sentry_sdk/integrations/flask.py 90.69% <100.00%> (+0.07%) ⬆️
... and 23 more

... and 1 file with indirect coverage changes

Base automatically changed from neel/typing-integrations-2 to neel/typing June 30, 2025 10:38
@sl0thentr0py sl0thentr0py merged commit e4ccd04 into neel/typing Jun 30, 2025
124 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/typing-integrations-3 branch June 30, 2025 10:38
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