Convert given default values to proper type

for when converting Settings to parseargs to void the type changing by
careless new default values.
This commit is contained in:
Florian Festi 2022-06-27 08:12:02 +02:00
parent fd30b8b0b7
commit c70eecd1d1
1 changed files with 2 additions and 2 deletions

View File

@ -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)