Make ParameterSource a proper Python 3 Enum subclass.#1535
Merged
Conversation
ThiefMaster
reviewed
Apr 20, 2020
alanbato
force-pushed
the
parameter-source-enum
branch
from
April 20, 2020 18:41
b02a54e to
f5c3ba5
Compare
jab
reviewed
Apr 20, 2020
alanbato
force-pushed
the
parameter-source-enum
branch
from
April 20, 2020 23:16
4f7365e to
ebcb86e
Compare
Contributor
A reasonable first cut, for sure. But @davidism, not sure if that's what you had in mind. It seems to me that changing the usage sites to do direct enum comparison (rather than having to keep the custom |
ThiefMaster
removed their request for review
May 28, 2020 09:07
davidism
force-pushed
the
parameter-source-enum
branch
from
October 7, 2020 14:59
ebcb86e to
c85f9cd
Compare
Co-authored-by: David Lord <davidism@gmail.com>
davidism
force-pushed
the
parameter-source-enum
branch
from
October 7, 2020 15:03
c85f9cd to
3852f41
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 implements the change proposed in #1530.
I tried to make as few changes as possible, that's why I went and implemented a custom
__eq__()to support the current use case inside the library (mostly inside tests)Any comments and feedback are welcome :)
fixes #1530