From 06f901ba2daccc7c1358d3bd81d56c40d55d43d3 Mon Sep 17 00:00:00 2001 From: Zahari Date: Wed, 8 Nov 2017 14:27:19 +0100 Subject: [PATCH] Use float formatting to format float numbers Seems OK! --- src/reportengine/report.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reportengine/report.py b/src/reportengine/report.py index 3286520..6fe85a6 100644 --- a/src/reportengine/report.py +++ b/src/reportengine/report.py @@ -51,6 +51,7 @@ from . checks import make_check, CheckError, make_argcheck from . import styles from . import filefinder +from . import floatformatting log = logging.getLogger(__name__) @@ -391,6 +392,9 @@ def as_markdown(obj): if hasattr(obj, '__name__'): return obj.__name__ + if isinstance(obj, float): + return floatformatting.format_number(obj) + return str(obj)