Fix ListOrValue.to_doc signature
This commit is contained in:
parent
9607f3de59
commit
fef1a65247
@ -524,17 +524,17 @@ class ListOrValue(BaseType):
|
|||||||
else:
|
else:
|
||||||
return self.valtype.to_str(value)
|
return self.valtype.to_str(value)
|
||||||
|
|
||||||
def to_doc(self, value):
|
def to_doc(self, value, indent=0):
|
||||||
if value is None:
|
if value is None:
|
||||||
return 'empty'
|
return 'empty'
|
||||||
|
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
if len(value) == 1:
|
if len(value) == 1:
|
||||||
return self.valtype.to_doc(value[0])
|
return self.valtype.to_doc(value[0], indent)
|
||||||
else:
|
else:
|
||||||
return self.listtype.to_doc(value)
|
return self.listtype.to_doc(value, indent)
|
||||||
else:
|
else:
|
||||||
return self.valtype.to_doc(value)
|
return self.valtype.to_doc(value, indent)
|
||||||
|
|
||||||
|
|
||||||
class FlagList(List):
|
class FlagList(List):
|
||||||
|
Loading…
Reference in New Issue
Block a user