From c70eecd1d1c83ae6b4cc777df23b2fd7e61018ec Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 27 Jun 2022 08:12:02 +0200 Subject: [PATCH] Convert given default values to proper type for when converting Settings to parseargs to void the type changing by careless new default values. --- boxes/edges.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boxes/edges.py b/boxes/edges.py index 231b879..6918248 100644 --- a/boxes/edges.py +++ b/boxes/edges.py @@ -168,7 +168,7 @@ class Settings(object): # Overwrite default if name in defaults: - default = defaults[name] + default = type(default)(defaults[name]) if type(default) not in (bool, int, float, str): raise ValueError("Type not supported: %r", default) @@ -800,7 +800,7 @@ Values: * absolute * style : "rectangular" : style of the fingers - * surroundingspaces : 2 : minimal space at the start and end in multiple of normal spaces + * surroundingspaces : 2.0 : minimal space at the start and end in multiple of normal spaces * angle: 90 : Angle of the walls meeting * relative (in multiples of thickness)