[pitivi] Fix pylint blacklisted-name



commit c7a6a440dc785eebe01496c1c13735a895a2f794
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Oct 28 21:23:59 2019 +0100

    Fix pylint blacklisted-name

 pitivi/editorperspective.py |  6 +++---
 pitivi/utils/loggable.py    | 49 ---------------------------------------------
 2 files changed, 3 insertions(+), 52 deletions(-)
---
diff --git a/pitivi/editorperspective.py b/pitivi/editorperspective.py
index 48c5b5fe..020c8186 100644
--- a/pitivi/editorperspective.py
+++ b/pitivi/editorperspective.py
@@ -750,9 +750,9 @@ class EditorPerspective(Perspective, Loggable):
 
     def __save_frame_cb(self, unused_action, unused_param):
         """Exports a snapshot of the current frame as an image file."""
-        foo = self._showSaveScreenshotDialog()
-        if foo:
-            path, mime = foo[0], foo[1]
+        res = self._showSaveScreenshotDialog()
+        if res:
+            path, mime = res[0], res[1]
             self.app.project_manager.current_project.pipeline.save_thumbnail(
                 -1, -1, mime, path)
 
diff --git a/pitivi/utils/loggable.py b/pitivi/utils/loggable.py
index c88d4c97..cdfedfe3 100644
--- a/pitivi/utils/loggable.py
+++ b/pitivi/utils/loggable.py
@@ -221,55 +221,6 @@ class TerminalController:
         else:
             return getattr(self, s[2:-1])
 
-#
-# Example use case: progress bar
-#
-
-
-class ProgressBar:
-    """A 3-line progress bar.
-
-    Looks like this:
-
-                                Header
-        20% [===========----------------------------------]
-                           progress message
-
-    The progress bar is colored, if the terminal supports color
-    output; and adjusts to the width of the terminal.
-    """
-
-    BAR = '%3d%% ${GREEN}[${BOLD}%s%s${NORMAL}${GREEN}]${NORMAL}\n'
-    HEADER = '${BOLD}${CYAN}%s${NORMAL}\n\n'
-
-    def __init__(self, term, header):
-        self.term = term
-        if not (self.term.CLEAR_EOL and self.term.UP and self.term.BOL):
-            raise ValueError("Terminal isn't capable enough -- you "
-                             "should use a simpler progress display.")
-        self.width = self.term.COLS or 75
-        self.bar = term.render(self.BAR)
-        self.header = self.term.render(self.HEADER % header.center(self.width))
-        self.cleared = 1  # : true if we haven't drawn the bar yet.
-        self.update(0, '')
-
-    def update(self, percent, message):
-        if self.cleared:
-            sys.stdout.write(self.header)
-            self.cleared = 0
-        n = int((self.width - 10) * percent)
-        sys.stdout.write(
-            self.term.BOL + self.term.UP + self.term.CLEAR_EOL +
-            (self.bar % (100 * percent, '=' * n, '-' * (self.width - 10 - n))) +
-            self.term.CLEAR_EOL + message.center(self.width))
-
-    def clear(self):
-        if not self.cleared:
-            sys.stdout.write(self.term.BOL + self.term.CLEAR_EOL +
-                             self.term.UP + self.term.CLEAR_EOL +
-                             self.term.UP + self.term.CLEAR_EOL)
-            self.cleared = 1
-
 
 def getLevelName(level):
     """Returns the name of the specified log level.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]