Skip to content

Commit

Permalink
reddit: fix floating point issue on %
Browse files Browse the repository at this point in the history
Co-authored-by: cottongin <cottongin@users.noreply.github.com>
  • Loading branch information
Exirel and cottongin committed Nov 9, 2020
1 parent 2744f92 commit cc667c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sopel/modules/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def say_post_info(bot, trigger, id_, show_link=True, show_comments_link=False):

points_text = 'point' if s.score == 1 else 'points'

percent = color(unicode(s.upvote_ratio * 100) + '%', point_color)
percent = color('{:.1%}'.format(s.upvote_ratio), point_color)

comments_link = ''
if show_comments_link:
Expand Down

0 comments on commit cc667c5

Please sign in to comment.