Fix ListOrValue.to_doc signature
This commit is contained in:
parent
9607f3de59
commit
fef1a65247
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user