Skip to content

Commit 80da488

Browse files
author
Pedro Nunes
committed
remove double-quotes for prettify
1 parent c74730f commit 80da488

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

testipy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import logging
44

55

6-
__version__ = "0.9.6.2"
6+
__version__ = "0.9.6.3"
77
__app__ = "TestiPy"
88
__app_full__ = "Python Test Tool"
99
__author__ = "Pedro Nunes"

testipy/helpers/prettify.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def prettify(json_obj, as_yaml: bool = False, indent: int = 3) -> str:
2828
return json.dumps(json_obj, indent=indent).replace("\\n", "\n")
2929
except:
3030
pass
31+
if isinstance(json_obj, (str, int, float)):
32+
return str(json_obj)
3133
return _dict2pstr(json_obj, indent=indent)
3234

3335

0 commit comments

Comments
 (0)