Skip to content

Commit

Permalink
Merge branch 'gwall/azaitsev#1/nines-bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Wall committed Jul 8, 2021
2 parents 7162c28 + fef20ac commit 9217896
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions millify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def millify(n, precision=0, drop_nulls=True, prefixes=[]):
while abs(n) >= 1000:
millidx += 1
n = round(n / 1000.0, precision)
if n < 1000:
round(n, precision)
result = '{}'.format(n)
if drop_nulls:
result = result.rstrip('0').rstrip('.')
Expand Down

0 comments on commit 9217896

Please sign in to comment.