Skip to content

Commit f2c6f62

Browse files
committed
fixed convert int
1 parent 298c82b commit f2c6f62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gendiff/formater/to_plain.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
def convert(elem):
22
if not isinstance(elem['value'], list):
33
value = elem['value']
4-
if type(value) in (int, float, str):
5-
return f"'{value}'"
4+
if type(value) in (int, float):
5+
return value
66
if type(value) == bool:
77
return str(value).lower()
88
if value is None:
99
return "null"
10+
if type(value) == str:
11+
return f"'{value}'"
1012
return '[complex value]'
1113

1214

0 commit comments

Comments
 (0)