Skip to content

Commit

Permalink
Use float formatting to format float numbers
Browse files Browse the repository at this point in the history
Seems OK!
  • Loading branch information
Zaharid committed Nov 8, 2017
1 parent 4408d64 commit 06f901b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/reportengine/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit 06f901b

Please sign in to comment.