{{ message }}
Repository navigation
Fix/1920 - #1921
Open
Mr-Sunglasses wants to merge 2 commits into
Open
Fix/1920#1921Mr-Sunglasses wants to merge 2 commits into
Mr-Sunglasses wants to merge 2 commits into
Conversation
Author
sobolevn
reviewed
Aug 30, 2024
sobolevn
left a comment
Member
There was a problem hiding this comment.
Please, add tests cases for:
- Empty replace
- Replace with correct value
- Replace with incorrect values
|
|
||
| def __replace__(self, **changes: Any) -> 'BaseContainer': | ||
| """Create a new instance with specified changes.""" | ||
| if set(changes.keys()) - set(self.__slots__): |
Member
There was a problem hiding this comment.
I think that we can simplify this to only allow _inner_value change. Nothing else.
Member
There was a problem hiding this comment.
Ok, I was wrong about adding this method to BaseContainer base class. I think that we need to add this to Unwrappable (?) instead. Basically, right now - this is not type-safe at all.
And add a proper type annotations. And add type tests for it.
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.

I have made things!
Checklist
CHANGELOG.mdRelated issues
fix: #1920
🙏 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.