Fix ListOrValue.to_doc signature

This commit is contained in:
Florian Bruhin 2017-09-27 10:37:42 +02:00
parent 9607f3de59
commit fef1a65247

View File

@ -524,17 +524,17 @@ class ListOrValue(BaseType):
else:
return self.valtype.to_str(value)
def to_doc(self, value):
def to_doc(self, value, indent=0):
if value is None:
return 'empty'
if isinstance(value, list):
if len(value) == 1:
return self.valtype.to_doc(value[0])
return self.valtype.to_doc(value[0], indent)
else:
return self.listtype.to_doc(value)
return self.listtype.to_doc(value, indent)
else:
return self.valtype.to_doc(value)
return self.valtype.to_doc(value, indent)
class FlagList(List):