-
Notifications
You must be signed in to change notification settings - Fork 12
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
Modifying dictionary? #197
Comments
I was able to intelligently go with Option 3, where it only makes another copy if the input changes (at the expense of making at least one copy and doing a comparison every check). So now this will warn unless 1 or 2 is done, but will work correctly and not break other checks. |
Thank you very much for reporting this @henryiii. Probably this is related on how the A viable approach is to add a deepcopy in Do you have any thoughts on that? |
Maybe it would be worth asking there first, then? Documenting this and letting a user decide to pay the cost for the deepcopy would probably be fine - much of the time, it's probably fine to let it mutate, since often it's not being used after being validated. It's only needed if you want to use it afterwards. |
It looks like this modifies the input dictionary, filling in the defaults. That's why some checks are strongly failing for repo-review; repo-review assumes the input dictionary is not modified. There are three possible fixes:
I'd much rather at least Option 2 over Option 3, but maybe Option 1 should be investigated first?
Before:
After:
The text was updated successfully, but these errors were encountered: