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:
parent
fd30b8b0b7
commit
c70eecd1d1
|
@ -168,7 +168,7 @@ class Settings(object):
|
||||||
|
|
||||||
# Overwrite default
|
# Overwrite default
|
||||||
if name in defaults:
|
if name in defaults:
|
||||||
default = defaults[name]
|
default = type(default)(defaults[name])
|
||||||
|
|
||||||
if type(default) not in (bool, int, float, str):
|
if type(default) not in (bool, int, float, str):
|
||||||
raise ValueError("Type not supported: %r", default)
|
raise ValueError("Type not supported: %r", default)
|
||||||
|
@ -800,7 +800,7 @@ Values:
|
||||||
|
|
||||||
* absolute
|
* absolute
|
||||||
* style : "rectangular" : style of the fingers
|
* 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
|
* angle: 90 : Angle of the walls meeting
|
||||||
|
|
||||||
* relative (in multiples of thickness)
|
* relative (in multiples of thickness)
|
||||||
|
|
Loading…
Reference in New Issue