From 55a5812b6b29f9127c14afdac7f3911814c16301 Mon Sep 17 00:00:00 2001 From: caitsith2 Date: Thu, 18 Jun 2020 19:21:52 -0700 Subject: [PATCH] Remove list(map(int, x)) --- Mystery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mystery.py b/Mystery.py index e72ad0cf..6eda3ce3 100644 --- a/Mystery.py +++ b/Mystery.py @@ -230,7 +230,7 @@ def get_choice(option, root, value=None) -> typing.Any: return interpret_on_off(root[option]) if not root[option]: return value - if any(list(map(int, root[option].values()))): + if any(root[option].values()): return interpret_on_off( random.choices(list(root[option].keys()), weights=list(map(int, root[option].values())))[0]) raise RuntimeError(f"All options specified in {option} are weighted as zero.")