From d2e884b1d9e845048da362b04e99181cbb506aa6 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 6 Jan 2022 06:18:54 +0100 Subject: [PATCH] Options: allow Toggles to be hashed --- Options.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Options.py b/Options.py index ef786e47..2bf329f1 100644 --- a/Options.py +++ b/Options.py @@ -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