[virt-tools-list] [PATCH 12/17] progress: Resolve E501 and E305

Radostin Stoyanov rstoyanov1 at gmail.com
Thu Oct 25 12:37:53 UTC 2018


E501: line too long (82 > 79 characters)
E305: expected 2 blank lines after end of function or class

Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 virtinst/progress.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/virtinst/progress.py b/virtinst/progress.py
index d86d5301..51d5254d 100644
--- a/virtinst/progress.py
+++ b/virtinst/progress.py
@@ -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
 
 ######################################################################
-- 
2.17.2




More information about the virt-tools-list mailing list