Fixed the Optionable._type method for empty lists.
This commit is contained in:
parent
6d09d662be
commit
acfb74335b
|
|
@ -72,6 +72,8 @@ class Optionable(object):
|
||||||
if isinstance(v, dict):
|
if isinstance(v, dict):
|
||||||
return 'dict'
|
return 'dict'
|
||||||
if isinstance(v, list):
|
if isinstance(v, list):
|
||||||
|
if len(v) == 0:
|
||||||
|
return 'list(string)'
|
||||||
return 'list({})'.format(Optionable._typeof(v[0]))
|
return 'list({})'.format(Optionable._typeof(v[0]))
|
||||||
return 'None'
|
return 'None'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue