We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84c32ea commit f012470Copy full SHA for f012470
gendiff/formaters/stylish.py
@@ -2,13 +2,11 @@ def format_value(value, depth):
2
indent = " " * (depth * 4)
3
4
if isinstance(value, dict):
5
- formatted = ["{"]
+ lines = ["{"]
6
for k, v in value.items():
7
- formatted.append(
8
- f"{indent} {k}: {format_value(v, depth + 1)}"
9
- )
10
- formatted.append(f"{indent}}}")
11
- return "\n".join(formatted)
+ lines.append(f"{indent} {k}: {format_value(v, depth + 1)}")
+ lines.append(f"{indent}}}")
+ return "\n".join(lines)
12
13
if value is True:
14
return "true"
@@ -17,7 +15,8 @@ def format_value(value, depth):
17
15
if value is None:
18
16
return "null"
19
20
- return f" {value}"
+ return str(value)
+
21
22
23
def format_stylish(diff, depth=0):
0 commit comments