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

✨ Add Typer integration #3869

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

patrick91
Copy link

This PR adds an integration for Typer

The integration works by mocking typer.main.except_hook, I was chatting with Sebastian and he's willing to add a hook in typer to avoid mocking, but I think it's also fine to keep the code as is 😊

The code is inspired by the ExcepthookIntegration, same thing for the test, unfortunately there's no way to test a custom except_hook with pytest, so I'm running the CLI using subprocess.

Shall I add this to the default integrations? 😊

Closes #1612
Closes #1604

@sentrivana
Copy link
Contributor

Thank you @patrick91 ❤️ We will take a look at this next week!

Shall I add this to the default integrations? 😊

As with all new integrations I'd prefer we leave this as opt-in for a couple of releases and then re-evaluate, just to be safe.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.

Project coverage is 79.71%. Comparing base (6448c70) to head (7b97222).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
sentry_sdk/integrations/typer.py 0.00% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3869      +/-   ##
==========================================
- Coverage   79.93%   79.71%   -0.23%     
==========================================
  Files         137      138       +1     
  Lines       15403    15433      +30     
  Branches     2620     2623       +3     
==========================================
- Hits        12313    12303      -10     
- Misses       2217     2262      +45     
+ Partials      873      868       -5     
Files with missing lines Coverage Δ
sentry_sdk/integrations/typer.py 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

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.

Sentry won't work properly with typer
2 participants