progress: Resolve E501 and E305
E501: line too long (82 > 79 characters) E305: expected 2 blank lines after end of function or class Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
parent
e7a3a55f2d
commit
5e6b73d439
|
@ -284,9 +284,11 @@ class TextMeter(BaseMeter):
|
|||
# Make text grow a bit before we start growing the bar too
|
||||
blen = 4 + tl.rest_split(8 + 8 + 4)
|
||||
ui_bar = _term_add_bar(tl, blen, frac)
|
||||
out = '\r%-*.*s%s%s%s%s%s%s%s\r' % (tl.rest(), tl.rest(), text,
|
||||
ui_sofar_pc, ui_pc, ui_bar,
|
||||
ui_rate, ui_size, ui_time, ui_end)
|
||||
out = '\r%-*.*s%s%s%s%s%s%s%s\r' % (
|
||||
tl.rest(), tl.rest(), text,
|
||||
ui_sofar_pc, ui_pc, ui_bar,
|
||||
ui_rate, ui_size, ui_time, ui_end
|
||||
)
|
||||
|
||||
self.fo.write(out)
|
||||
self.fo.flush()
|
||||
|
@ -305,7 +307,8 @@ class TextMeter(BaseMeter):
|
|||
# For big screens, make it more readable.
|
||||
use_hours = bool(tl._llen > 80)
|
||||
ui_size = tl.add(' | %5sB' % total_size)
|
||||
ui_time = tl.add(' %s' % format_time(self.re.elapsed_time(), use_hours))
|
||||
ui_time = tl.add(' %s' % format_time(self.re.elapsed_time(),
|
||||
use_hours))
|
||||
ui_end, not_done = _term_add_end(tl, self.size, amount_read)
|
||||
out = '\r%-*.*s%s%s%s\n' % (tl.rest(), tl.rest(), text,
|
||||
ui_size, ui_time, ui_end)
|
||||
|
@ -323,6 +326,7 @@ class TextMeter(BaseMeter):
|
|||
_text_meter_total_size = 0
|
||||
_text_meter_sofar_size = 0
|
||||
|
||||
|
||||
text_progress_meter = TextMeter
|
||||
|
||||
######################################################################
|
||||
|
|
Loading…
Reference in New Issue