Add the ability to add debugging notes to the result.safe decorator.#2110
Open
madkopp wants to merge 10 commits intodry-python:masterfrom
Open
Add the ability to add debugging notes to the result.safe decorator.#2110madkopp wants to merge 10 commits intodry-python:masterfrom
madkopp wants to merge 10 commits intodry-python:masterfrom
Conversation
sobolevn
reviewed
Apr 11, 2025
Member
sobolevn
left a comment
There was a problem hiding this comment.
Generally looks good, but there are several things to add:
-
impure_safeandfuture_safeshould be updated as well - Please, add a
typesafetytest for this - Test an empty string
Thank you!
Author
Thanks for the comments! I've updated the pull request to reflect the changes. Let me know if anything needs tweaking. |
sobolevn
reviewed
Apr 12, 2025
Member
sobolevn
left a comment
There was a problem hiding this comment.
Thanks! Just two minor comments :)
Author
|
Ok pushed changes. Let me know if that addresses things. |
Author
|
FYI, I was looking at the code for the Result container and noticed that there's a |
Member
|
Yes, tracing is implemented. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the ability to add debugging notes to the result.safe decorator.
Checklist
CHANGELOG.mdRelated 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_failurekeyword is a little clunky.number
Would appreciate any help with the overloading of the
safedecorator 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-pythonvaluable, 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.