Skip to content

Commit

Permalink
Add no rate inversion option in bar_format
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L. <lrq3000@gmail.com>
  • Loading branch information
lrq3000 committed May 8, 2016
1 parent 36c5013 commit 560e897
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tqdm/_tqdm.py
Expand Up @@ -234,7 +234,12 @@ def format_meter(n, total, elapsed, ncols=None, prefix='',
'total': total,
'total_fmt': total_fmt,
'percentage': percentage,
'rate': rate,
'rate': rate if inv_rate is None else inv_rate,
'rate_noinv': rate,
'rate_noinv_fmt': ((format_sizeof(rate)
if unit_scale else
'{0:5.2f}'.format(rate))
if rate else '?') + 'it/s',
'rate_fmt': rate_fmt,
'elapsed': elapsed_str,
'remaining': remaining_str,
Expand Down

0 comments on commit 560e897

Please sign in to comment.