Options: allow Toggles to be hashed
This commit is contained in:
parent
80b3a5b1d4
commit
d2e884b1d9
|
@ -125,6 +125,8 @@ class Toggle(Option):
|
||||||
def get_option_name(cls, value):
|
def get_option_name(cls, value):
|
||||||
return ["No", "Yes"][int(value)]
|
return ["No", "Yes"][int(value)]
|
||||||
|
|
||||||
|
__hash__ = Option.__hash__ # see https://docs.python.org/3/reference/datamodel.html#object.__hash__
|
||||||
|
|
||||||
|
|
||||||
class DefaultOnToggle(Toggle):
|
class DefaultOnToggle(Toggle):
|
||||||
default = 1
|
default = 1
|
||||||
|
|
Loading…
Reference in New Issue