Skip to content

Commit

Permalink
Add Decimal to accpted types by util.nice_size()
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Mar 22, 2024
1 parent 4794ba9 commit a65d9a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
datetime,
timezone,
)
from decimal import Decimal
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from hashlib import md5
Expand Down Expand Up @@ -1524,7 +1525,7 @@ def shorten_with_metric_prefix(amount: int) -> str:
return str(amount)


def nice_size(size: Union[float, int, str]) -> str:
def nice_size(size: Union[float, int, str, Decimal]) -> str:
"""
Returns a readably formatted string with the size
Expand Down

0 comments on commit a65d9a1

Please sign in to comment.