Options: allow Toggles to be hashed

This commit is contained in:
Fabian Dill 2022-01-06 06:18:54 +01:00
parent 80b3a5b1d4
commit d2e884b1d9
1 changed files with 2 additions and 0 deletions

View File

@ -125,6 +125,8 @@ class Toggle(Option):
def get_option_name(cls, value):
return ["No", "Yes"][int(value)]
__hash__ = Option.__hash__ # see https://docs.python.org/3/reference/datamodel.html#object.__hash__
class DefaultOnToggle(Toggle):
default = 1