Fixed the Optionable._type method for empty lists.

This commit is contained in:
SET 2020-08-11 13:20:01 -03:00
parent 6d09d662be
commit acfb74335b
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,8 @@ class Optionable(object):
if isinstance(v, dict):
return 'dict'
if isinstance(v, list):
if len(v) == 0:
return 'list(string)'
return 'list({})'.format(Optionable._typeof(v[0]))
return 'None'