Remove list(map(int, x))
This commit is contained in:
parent
d7d7f32d0c
commit
55a5812b6b
|
@ -230,7 +230,7 @@ def get_choice(option, root, value=None) -> typing.Any:
|
||||||
return interpret_on_off(root[option])
|
return interpret_on_off(root[option])
|
||||||
if not root[option]:
|
if not root[option]:
|
||||||
return value
|
return value
|
||||||
if any(list(map(int, root[option].values()))):
|
if any(root[option].values()):
|
||||||
return interpret_on_off(
|
return interpret_on_off(
|
||||||
random.choices(list(root[option].keys()), weights=list(map(int, root[option].values())))[0])
|
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.")
|
raise RuntimeError(f"All options specified in {option} are weighted as zero.")
|
||||||
|
|
Loading…
Reference in New Issue