recal
This commit is contained in:
@@ -113,7 +113,7 @@ class Bellande_Format:
|
|||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
if isinstance(value, (dict, list)):
|
if isinstance(value, (dict, list)):
|
||||||
lines.append(f"{' ' * indent}{key}:")
|
lines.append(f"{' ' * indent}{key}:")
|
||||||
lines.append(self.to_bellande_string(value, indent + 4))
|
lines.append(self.to_bellande_string(value, indent + 2))
|
||||||
else:
|
else:
|
||||||
lines.append(f"{' ' * indent}{key}: {self.format_value(value)}")
|
lines.append(f"{' ' * indent}{key}: {self.format_value(value)}")
|
||||||
return '\n'.join(lines)
|
return '\n'.join(lines)
|
||||||
@@ -121,8 +121,9 @@ class Bellande_Format:
|
|||||||
lines = []
|
lines = []
|
||||||
for item in data:
|
for item in data:
|
||||||
if isinstance(item, dict):
|
if isinstance(item, dict):
|
||||||
lines.append(f"{' ' * indent}-")
|
dict_lines = self.to_bellande_string(item, indent + 2).split('\n')
|
||||||
lines.append(self.to_bellande_string(item, indent + 4))
|
lines.append(f"{' ' * indent}- {dict_lines[0]}")
|
||||||
|
lines.extend(dict_lines[1:])
|
||||||
else:
|
else:
|
||||||
lines.append(f"{' ' * indent}- {self.format_value(item)}")
|
lines.append(f"{' ' * indent}- {self.format_value(item)}")
|
||||||
return '\n'.join(lines)
|
return '\n'.join(lines)
|
||||||
|
Reference in New Issue
Block a user