fix increase_percent

This commit is contained in:
Son Nguyen Kim 2021-07-29 11:32:15 +02:00
parent cbcae31288
commit fcb18e66e8
1 changed files with 3 additions and 0 deletions

View File

@ -271,6 +271,9 @@ def increase_percent(old, new) -> str:
if old == 0:
return "N/A"
if not old or not new:
return "N/A"
increase = (new - old) / old * 100
return f"{increase:.1f}%. Delta: {new - old}"