Handle spawned attrs with dict, as per #1787
This commit is contained in:
parent
e9df197385
commit
5f8e08ecaf
2 changed files with 8 additions and 8 deletions
|
|
@ -106,7 +106,7 @@ def _format_option_value(prop, required=False, prototype=None, cropper=None):
|
|||
if utils.is_iter(prop):
|
||||
out = ", ".join(str(pr) for pr in prop)
|
||||
if not out and required:
|
||||
out = "|rreqrd"
|
||||
out = "|runset"
|
||||
if out:
|
||||
return " ({}|n)".format(cropper(out) if cropper else utils.crop(out, _MENU_CROP_WIDTH))
|
||||
return ""
|
||||
|
|
|
|||
|
|
@ -739,7 +739,7 @@ def init_spawn_value(value, validator=None):
|
|||
validator = validator if validator else lambda o: o
|
||||
if callable(value):
|
||||
value = validator(value())
|
||||
elif value and is_iter(value) and callable(value[0]):
|
||||
elif value and isinstance(value, (list, tuple)) and callable(value[0]):
|
||||
# a structure (callable, (args, ))
|
||||
args = value[1:]
|
||||
value = validator(value[0](*make_iter(args)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue