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

Don't show local variables in exceptions and errors #237

Merged
merged 2 commits into from
Sep 27, 2022
Merged

Conversation

ejm714
Copy link
Collaborator

@ejm714 ejm714 commented Sep 27, 2022

Fixes #233

Relevant part of typer docs explaining exception and error handling: https://typer.tiangolo.com/tutorial/exceptions/

We can turn off the rich behavior entirely, but I propose just turning off the "show local variables" behavior. This way, we still get a more nicely colored stack trace, but with the same amount of info as before.

Below is a screenshot from the example case, showing the new behavior:
image

@netlify
Copy link

netlify bot commented Sep 27, 2022

Deploy Preview for silly-keller-664934 ready!

Name Link
🔨 Latest commit 435c391
🔍 Latest deploy log https://app.netlify.com/sites/silly-keller-664934/deploys/63334c8dac8e2d0008a5abcc
😎 Deploy Preview https://deploy-preview-237--silly-keller-664934.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ejm714 ejm714 requested a review from pjbull September 27, 2022 19:18
@github-actions
Copy link
Contributor

Copy link
Member

@pjbull pjbull left a comment

Choose a reason for hiding this comment

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

Nice!

@pjbull pjbull merged commit 6ebccaf into master Sep 27, 2022
@pjbull pjbull deleted the 233-fix-typer branch September 27, 2022 20:10
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.

Typer integration with rich causes error messages that are too long
2 participants