diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2016-09-28 20:34:53 +0200 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2016-09-28 20:34:53 +0200 |
commit | 3da48e7d6134397d5f8686f1421bcaec4c647349 (patch) | |
tree | fb13f2e539c3f85dd8dc09411ea0cf9445fa0d73 | |
parent | 032fccd7af694867ec37779f6603cc5c69a5cfc9 (diff) |
debug-viewer: cleanup imports in plugins
Don't use * imports. Don't rely on package level imports.
4 files changed, 10 insertions, 6 deletions
diff --git a/debug-viewer/GstDebugViewer/Plugins/FileProperties.py b/debug-viewer/GstDebugViewer/Plugins/FileProperties.py index 34b8d8c..fe62f05 100644 --- a/debug-viewer/GstDebugViewer/Plugins/FileProperties.py +++ b/debug-viewer/GstDebugViewer/Plugins/FileProperties.py @@ -19,8 +19,11 @@ """GStreamer Debug Viewer file properties plugin.""" -from GstDebugViewer.Plugins import * import logging + +from GstDebugViewer.Plugins import FeatureBase, PluginBase + +from gettext import gettext as _ from gi.repository import Gtk class FilePropertiesSentinel (object): diff --git a/debug-viewer/GstDebugViewer/Plugins/FindBar.py b/debug-viewer/GstDebugViewer/Plugins/FindBar.py index d6ae27c..4e7f5a0 100644 --- a/debug-viewer/GstDebugViewer/Plugins/FindBar.py +++ b/debug-viewer/GstDebugViewer/Plugins/FindBar.py @@ -22,8 +22,9 @@ import logging from GstDebugViewer import Common, Data, GUI -from GstDebugViewer.Plugins import * +from GstDebugViewer.Plugins import FeatureBase, PluginBase, _N +from gettext import gettext as _ from gi.repository import GObject, GLib from gi.repository import Gtk diff --git a/debug-viewer/GstDebugViewer/Plugins/Timeline.py b/debug-viewer/GstDebugViewer/Plugins/Timeline.py index e8fd194..acd8c17 100644 --- a/debug-viewer/GstDebugViewer/Plugins/Timeline.py +++ b/debug-viewer/GstDebugViewer/Plugins/Timeline.py @@ -23,8 +23,9 @@ import logging from GstDebugViewer import Common, Data from GstDebugViewer.GUI.colors import LevelColorThemeTango, ThreadColorThemeTango -from GstDebugViewer.Plugins import * +from GstDebugViewer.Plugins import FeatureBase, PluginBase +from gettext import gettext as _ from gi.repository import GObject from gi.repository import Gtk from gi.repository import Gdk @@ -356,7 +357,7 @@ class VerticalTimelineWidget (Gtk.DrawingArea): self.queue_draw () return False - + def do_get_preferred_width (self): return 64, 64 # FIXME @@ -533,7 +534,7 @@ class TimelineWidget (Gtk.DrawingArea): ctx.set_source_surface (self.__offscreen) ctx.rectangle (rect.x, rect.y, rect.width, rect.height) ctx.paint () - + self.__draw_position (ctx, clip = rect) def update (self, model): diff --git a/debug-viewer/GstDebugViewer/Plugins/__init__.py b/debug-viewer/GstDebugViewer/Plugins/__init__.py index 0879f3e..e2b7fef 100644 --- a/debug-viewer/GstDebugViewer/Plugins/__init__.py +++ b/debug-viewer/GstDebugViewer/Plugins/__init__.py @@ -22,7 +22,6 @@ __all__ = ["_", "_N", "FeatureBase", "PluginBase"] import os.path -from gettext import gettext as _ def _N (s): return s |