Repository navigation
Refactor "magic" method constants so that there are no dups - #4838
Merged
Merged
Conversation
Also change sharedparse.py to avoid this kind of bug in future. Fixes #4767.
Also change sharedparse.py to avoid this kind of bug in future. Fixes #4767.
Also change sharedparse.py to avoid this kind of bug in future. Fixes #4767.
… I had made. (Also removed a few more dups)
to avoid bugs like issue #4770 This has been hand-checked to verify that MAGIC_METHODS is the same (the other constants have only been moved within the file)
msullivan
reviewed
Apr 4, 2018
msullivan
left a comment
Collaborator
There was a problem hiding this comment.
One nit but looks good to me.
|
|
||
|
|
||
| MAGIC_METHODS = { | ||
| _NON_BINARY_MAGIC_METHODS = { |
Collaborator
There was a problem hiding this comment.
I'd drop the initial underscore here.
Contributor
Author
There was a problem hiding this comment.
_NON_BINARY_MAGIC_METHODS isn't used anywhere else and its existence is a side-effect of the implementation, so I'd rather leave the initial underscore if you don't mind. If someone wants to use this value in future, they can always remove the initial underscore at that time.
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.
This is to avoid bugs like issue #4770 and to make some planned changes easier to review.
I have hand-checked to verify that MAGIC_METHODS hasn't changed (the other constants have only been moved within the file).