-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Make defaults minimally invasive #61
Comments
Now that I understand why this highlighting is happening, I'm in a better position to actually use it. I've installed a sitecustomize config into my venv site-packages, and I'm wondering what the no-op configuration would look like? I basically want the vanilla Python error message experience, except with highlighting. What would I need to change to get that behavior in this config:
Is that even possible? |
I think it'd be easier to use one of the other error prettifier packages
than try to configure this one back to the default behavior. It's probably do-able, but a lot of hassle.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently in addition to highlighting the error messages, pretty_errors will attempt to make them more concise by removing information in default traceback messages. This is a suggestion, and not necessarily a problem with the package, but it causes confusion when you don't expect this package to be imported.
The issue I had was torchmetrics imported this package, which patched the sys.execpthook, which left me very confused as to where the filepaths in my traceback went: Lightning-AI/torchmetrics#2544
If this package just highlighted the errors instead of removing the paths to the files they occurred in, then I would have loved the new unexpected behavior.
Because you need to already need have context in order to understand which files the filename-only method refers to perhaps getting that more concise set of errors should be an opt-in configuration? I.e. be minimally invasive by default and let the user choose if they want more complex behavior?
The text was updated successfully, but these errors were encountered: