-
-
Notifications
You must be signed in to change notification settings - Fork 128
Add the ability to add debugging notes to the result.safe decorator. #2110
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, but there are several things to add:
-
impure_safe
andfuture_safe
should be updated as well - Please, add a
typesafety
test for this - Test an empty string
Thank you!
Thanks for the comments! I've updated the pull request to reflect the changes. Let me know if anything needs tweaking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just two minor comments :)
Ok pushed changes. Let me know if that addresses things. |
FYI, I was looking at the code for the Result container and noticed that there's a |
Yes, tracing is implemented. |
Add the ability to add debugging notes to the result.safe decorator.
Checklist
CHANGELOG.md
Related issues
-Refs #2107, but may not fully close it. The need to provide a list of Exceptions in order to use the
add_note_on_failure
keyword is a little clunky.number
Would appreciate any help with the overloading of the
safe
decorator to alleviate the need to provide a list of Exceptions.I wasn't exactly sure how you wanted me to add the changes to the change log, so I just made a "Features" section at the top of the list that isn't attached to any version. (I wasn't sure if you wanted me to go creating version numbers on your behalf or not).
Thanks for the great package!
🙏 Please, if you or your company finds
dry-python
valuable, help us sustain the project by sponsoring it transparently on https://github.com/sponsors/dry-python. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.