[pitivi] Remove all spaces before or after parenthesis



commit f0fc710857a8e823ac709514bef278cf81b5217c
Author: Thibault Saunier <thibault saunier collabora com>
Date:   Fri Jun 3 04:53:53 2011 -0400

    Remove all spaces before or after parenthesis

 pitivi/elements/mixer.py           |   12 ++++++------
 pitivi/elements/singledecodebin.py |    4 ++--
 pitivi/elements/thumbnailsink.py   |    4 ++--
 pitivi/factories/operation.py      |    6 +++---
 pitivi/settings.py                 |    2 +-
 pitivi/timeline/timeline.py        |    2 +-
 pitivi/timeline/track.py           |    2 +-
 pitivi/ui/clipproperties.py        |    8 ++++----
 pitivi/ui/dynamic.py               |    8 ++++----
 pitivi/ui/effectlist.py            |   16 ++++++++--------
 pitivi/ui/mainwindow.py            |    4 ++--
 pitivi/ui/timeline.py              |   12 ++++++------
 pitivi/ui/viewer.py                |    4 ++--
 tests/test_etree_formatter.py      |    2 +-
 tests/test_factories_operation.py  |    4 ++--
 tests/test_gap.py                  |   16 ++++++++--------
 win32/setup.py                     |   26 +++++++++++++-------------
 17 files changed, 66 insertions(+), 66 deletions(-)
---
diff --git a/pitivi/elements/mixer.py b/pitivi/elements/mixer.py
index b363b48..92028dc 100644
--- a/pitivi/elements/mixer.py
+++ b/pitivi/elements/mixer.py
@@ -156,8 +156,8 @@ class SmartVideomixerBin(gst.Bin):
         #   http://jeff.ecchi.ca/blog/2011/04/24/negotiating-performance/
         for pad_name in self.inputs:
             values = self.inputs.get(pad_name)
-            values[3].send_event (gst.event_new_flush_start())
-            values[3].send_event (gst.event_new_flush_stop())
+            values[3].send_event(gst.event_new_flush_start())
+            values[3].send_event(gst.event_new_flush_stop())
             if not values[3].is_blocked():
                 values[3].set_blocked_async(True, self._pad_blockedCb)
 
@@ -184,15 +184,15 @@ class SmartVideomixerBin(gst.Bin):
 
         for pad_name in self.inputs:
             values = self.inputs.get(pad_name)
-            values[3].send_event (gst.event_new_flush_start())
-            values[3].send_event (gst.event_new_flush_stop())
+            values[3].send_event(gst.event_new_flush_start())
+            values[3].send_event(gst.event_new_flush_stop())
             if values[3].is_blocked():
                 values[3].set_blocked_async(False, self._pad_blockedCb)
 
         self.sync_state_with_parent()
 
     def update_priority(self, pad, priority):
-        self.debug("pad:%r, priority:%d" % ( pad, priority))
+        self.debug("pad:%r, priority:%d" % (pad, priority))
         if priority > 10000:
             priority = 10000
         a,b,c,sinkpad = self.inputs.get(pad.get_name(), (None, None, None, None))
@@ -286,7 +286,7 @@ class SmartVideomixerBinPropertyHelper(Signallable):
             # has been removed and its gnl_object doesn't contain any
             # controllable element anymore
             interpolator = track_object.interpolators["alpha"][1]
-        except (KeyError, TrackError):
+        except(KeyError, TrackError):
             # no alpha
             pass
         else:
diff --git a/pitivi/elements/singledecodebin.py b/pitivi/elements/singledecodebin.py
index e9e1e0b..ddfd3b1 100644
--- a/pitivi/elements/singledecodebin.py
+++ b/pitivi/elements/singledecodebin.py
@@ -61,11 +61,11 @@ class SingleDecodeBin(gst.Bin):
     QUEUE_SIZE = 1 * gst.SECOND
 
     __gsttemplates__ = (
-        gst.PadTemplate ("sinkpadtemplate",
+        gst.PadTemplate("sinkpadtemplate",
                          gst.PAD_SINK,
                          gst.PAD_ALWAYS,
                          gst.caps_new_any()),
-        gst.PadTemplate ("srcpadtemplate",
+        gst.PadTemplate("srcpadtemplate",
                          gst.PAD_SRC,
                          gst.PAD_SOMETIMES,
                          gst.caps_new_any())
diff --git a/pitivi/elements/thumbnailsink.py b/pitivi/elements/thumbnailsink.py
index e170844..3fd0ac9 100644
--- a/pitivi/elements/thumbnailsink.py
+++ b/pitivi/elements/thumbnailsink.py
@@ -38,11 +38,11 @@ class CairoSurfaceThumbnailSink(gst.BaseSink):
     __gsignals__ = {
         "thumbnail" : (gobject.SIGNAL_RUN_LAST,
                        gobject.TYPE_NONE,
-                       ( gobject.TYPE_PYOBJECT, gobject.TYPE_UINT64 ))
+                       (gobject.TYPE_PYOBJECT, gobject.TYPE_UINT64))
         }
 
     __gsttemplates__ = (
-        gst.PadTemplate ("sink",
+        gst.PadTemplate("sink",
                          gst.PAD_SINK,
                          gst.PAD_ALWAYS,
                          gst.Caps("video/x-raw-rgb,"
diff --git a/pitivi/factories/operation.py b/pitivi/factories/operation.py
index 5ff8513..8e1ce84 100644
--- a/pitivi/factories/operation.py
+++ b/pitivi/factories/operation.py
@@ -56,11 +56,11 @@ class TransformFactory(OperationFactory):
     def _requestNewInputStream(self, *args):
         raise OperationFactoryError("TransformFactory doesn't allow request pads")
 
-class EffectFactory (TransformFactory):
+class EffectFactory(TransformFactory):
     """
     Factories that applies an effect on a stream
     """
-    def __init__ (self, effect, name='', categories=[_("Uncategorized")],
+    def __init__(self, effect, name='', categories=[_("Uncategorized")],
                   human_name="", description="", icon=None):
         TransformFactory.__init__(self, name)
         self.effectname = effect
@@ -78,7 +78,7 @@ class EffectFactory (TransformFactory):
     def getCategories(self):
         return self.categories
 
-    def _makeBin (self, *args):
+    def _makeBin(self, *args):
         bin = gst.Bin()
         fx = gst.element_factory_make(self.effectname, "effect")
         if isinstance(self.input_streams[0], VideoStream):
diff --git a/pitivi/settings.py b/pitivi/settings.py
index 7a3d10e..d441ebc 100644
--- a/pitivi/settings.py
+++ b/pitivi/settings.py
@@ -505,7 +505,7 @@ class ExportSettings(Signallable, Loggable):
     def __str__(self):
         msg = _("Export Settings\n")
         msg += _("Video: ") + str(self.videowidth) + " " + str(self.videoheight) +\
-               " " + str(self.videorate) + " " + str (self.videopar)
+               " " + str(self.videorate) + " " + str(self.videopar)
         msg += "\n\t" + str(self.vencoder) + " " +str(self.vcodecsettings)
         msg += _("\nAudio: ") + str(self.audiochannels) + " " + str(self.audiorate) +\
                " " + str(self.audiodepth)
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index ec1503e..629918d 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1561,7 +1561,7 @@ class Timeline(Signallable, Loggable):
             self.duration = duration
             self.emit('duration-changed', duration)
 
-    def updateVideoCaps (self, caps= None):
+    def updateVideoCaps(self, caps= None):
         if caps:
             self._video_caps = caps
 
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index f5bce4e..c9eec4c 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -543,7 +543,7 @@ class TrackObject(Signallable, Loggable):
         if priority != self._public_priority:
             self._updatePriority(priority)
 
-    def _getTruePriority (self, priority):
+    def _getTruePriority(self, priority):
         """ calculate the priority the contained gnlobject should have """
         if self.stream_type is VideoStream:
             return 3 + self._stagger + (3 * priority)
diff --git a/pitivi/ui/clipproperties.py b/pitivi/ui/clipproperties.py
index a0a5c79..4f9ff3a 100644
--- a/pitivi/ui/clipproperties.py
+++ b/pitivi/ui/clipproperties.py
@@ -94,7 +94,7 @@ class ClipProperties(gtk.VBox, Loggable):
         label.set_line_wrap(True)
         label.set_line_wrap_mode(pango.WRAP_WORD)
         label.set_justify(gtk.JUSTIFY_CENTER)
-        label.set_text (text)
+        label.set_text(text)
 
         info_bar.add(label)
         self.info_bar_box.pack_start(info_bar, expand=False, fill=False)
@@ -250,13 +250,13 @@ class EffectProperties(gtk.HBox):
         self._updateAll()
 
     def  _trackObjectAddedCb(self, unused_timeline_object, track_object):
-        if isinstance (track_object, TrackEffect):
+        if isinstance(track_object, TrackEffect):
             selec = self.timeline.selection.getSelectedTrackEffects()
             self.selected_effects = selec
             self._updateAll()
 
     def  _trackRemovedRemovedCb(self, unused_timeline_object, track_object):
-        if isinstance (track_object, TrackEffect):
+        if isinstance(track_object, TrackEffect):
             selec = self.timeline.selection.getSelectedTrackEffects()
             self.selected_effects = selec
             self._updateAll()
@@ -329,7 +329,7 @@ class EffectProperties(gtk.HBox):
         if context is None:
             return False
 
-        treeview.set_tooltip_row (tooltip, context[1][0])
+        treeview.set_tooltip_row(tooltip, context[1][0])
         tooltip.set_text(self.storemodel.get_value(context[2], COL_DESC_TEXT))
 
         return True
diff --git a/pitivi/ui/dynamic.py b/pitivi/ui/dynamic.py
index c0cc407..21f692a 100644
--- a/pitivi/ui/dynamic.py
+++ b/pitivi/ui/dynamic.py
@@ -263,9 +263,9 @@ class TimeWidget(TextWidget, DynamicWidget):
         TextWidget.setWidgetValue(self, time_to_string(value),
                                 send_signal = send_signal)
 
-    def connectFocusEvents (self, focusInCb, focusOutCb):
-        fIn = self.text.connect ("button-press-event", focusInCb)
-        fOut = self.text.connect ("focus-out-event", focusOutCb)
+    def connectFocusEvents(self, focusInCb, focusOutCb):
+        fIn = self.text.connect("button-press-event", focusInCb)
+        fOut = self.text.connect("focus-out-event", focusOutCb)
 
         return [fIn, fOut]
 
@@ -637,7 +637,7 @@ class FontWidget(gtk.FontButton, DynamicWidget):
 
 class ResolutionWidget(gtk.HBox, DynamicWidget):
 
-    def __init__ (self, default = None):
+    def __init__(self, default = None):
         gtk.HBox.__init__(self)
         DynamicWidget.__init__(self, default)
         self.props.spacing = 6
diff --git a/pitivi/ui/effectlist.py b/pitivi/ui/effectlist.py
index 8e82ffa..1c87d18 100644
--- a/pitivi/ui/effectlist.py
+++ b/pitivi/ui/effectlist.py
@@ -155,14 +155,14 @@ class EffectList(gtk.VBox, Loggable):
         self.iconview_scrollwin.add(self.iconview)
         self.iconview.set_property("has_tooltip", True)
 
-        self.effectType.connect ("changed", self._effectTypeChangedCb)
+        self.effectType.connect("changed", self._effectTypeChangedCb)
 
-        self.effectCategory.connect ("changed", self._effectCategoryChangedCb)
+        self.effectCategory.connect("changed", self._effectCategoryChangedCb)
 
-        self.searchEntry.connect ("changed", self.searchEntryChangedCb)
-        self.searchEntry.connect ("button-press-event", self.searchEntryActivateCb)
-        self.searchEntry.connect ("focus-out-event", self.searchEntryDesactvateCb)
-        self.searchEntry.connect ("icon-press", self.searchEntryIconClickedCb)
+        self.searchEntry.connect("changed", self.searchEntryChangedCb)
+        self.searchEntry.connect("button-press-event", self.searchEntryActivateCb)
+        self.searchEntry.connect("focus-out-event", self.searchEntryDesactvateCb)
+        self.searchEntry.connect("icon-press", self.searchEntryIconClickedCb)
 
         self.treeview.connect("button-press-event", self._buttonPressEventCb)
         self.treeview.connect("select-cursor-row", self._enterPressEventCb)
@@ -378,10 +378,10 @@ class EffectList(gtk.VBox, Loggable):
 
         if self.effect_view is SHOW_TREEVIEW or\
                     self._effect_type_ref == AUDIO_EFFECT:
-            view.set_tooltip_row (tooltip, context[1][0])
+            view.set_tooltip_row(tooltip, context[1][0])
         elif self.effect_view is SHOW_ICONVIEW and\
                      self._effect_type_ref == VIDEO_EFFECT:
-            view.set_tooltip_item (tooltip, context[1][0])
+            view.set_tooltip_item(tooltip, context[1][0])
         name = self.modelFilter.get_value(context[2], COL_ELEMENT_NAME)
         if self._current_effect_name != name:
             self._current_effect_name = name
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 5cc022c..5c4519f 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -69,7 +69,7 @@ if HAVE_GCONF:
     D_G_INTERFACE = "/desktop/gnome/interface"
 
     for gconf_dir in (D_G_INTERFACE, ):
-        gconf.client_get_default ().add_dir (gconf_dir, gconf.CLIENT_PRELOAD_NONE)
+        gconf.client_get_default().add_dir(gconf_dir, gconf.CLIENT_PRELOAD_NONE)
 
 GlobalSettings.addConfigOption("fileSupportEnabled",
     environment="PITIVI_FILE_SUPPORT",
@@ -615,7 +615,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
             action.props.active
 
     def _userManualCb(self, unused_action):
-        webbrowser.open_new (APPMANUALURL)
+        webbrowser.open_new(APPMANUALURL)
 
     def _aboutResponseCb(self, dialog, unused_response):
         dialog.destroy()
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 59a2dae..a1a5603 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -561,24 +561,24 @@ class Timeline(gtk.Table, Loggable, Zoomable):
         return True
 
     def scroll_left(self):
-        self._hscrollbar.set_value (self._hscrollbar.get_value() -
+        self._hscrollbar.set_value(self._hscrollbar.get_value() -
             self.hadj.props.page_size ** (2.0 / 3.0))
 
     def scroll_right(self):
-        self._hscrollbar.set_value (self._hscrollbar.get_value() +
+        self._hscrollbar.set_value(self._hscrollbar.get_value() +
             self.hadj.props.page_size ** (2.0 / 3.0))
 
     def scroll_up(self):
-        self._vscrollbar.set_value (self._vscrollbar.get_value() -
+        self._vscrollbar.set_value(self._vscrollbar.get_value() -
             self.vadj.props.page_size ** (2.0 / 3.0))
 
     def scroll_down(self):
-        self._vscrollbar.set_value (self._vscrollbar.get_value() +
+        self._vscrollbar.set_value(self._vscrollbar.get_value() +
             self.vadj.props.page_size ** (2.0 / 3.0))
 
     def _updateScrollPosition(self, adjustment):
         self._scroll_pos_ns = Zoomable.pixelToNs(self.hadj.get_value())
-        self._root_item.set_simple_transform( -self.hadj.get_value(),
+        self._root_item.set_simple_transform(-self.hadj.get_value(),
             -self.vadj.get_value(), 1.0, 0)
 
     def _zoomAdjustmentChangedCb(self, adjustment):
@@ -743,7 +743,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
 
             keyframe = True
 
-        if (len (timeline.timeline_objects) > 0):
+        if (len(timeline.timeline_objects) > 0):
             split = True
 
         self.delete_action.set_sensitive(delete)
diff --git a/pitivi/ui/viewer.py b/pitivi/ui/viewer.py
index a0703ea..9287741 100644
--- a/pitivi/ui/viewer.py
+++ b/pitivi/ui/viewer.py
@@ -637,9 +637,9 @@ class PlayPauseButton(gtk.Button, Loggable):
     """ Double state gtk.Button which displays play/pause """
 
     __gsignals__ = {
-        "play" : ( gobject.SIGNAL_RUN_LAST,
+        "play" : (gobject.SIGNAL_RUN_LAST,
                    gobject.TYPE_NONE,
-                   (gobject.TYPE_BOOLEAN, ))
+                   (gobject.TYPE_BOOLEAN,))
         }
 
     def __init__(self):
diff --git a/tests/test_etree_formatter.py b/tests/test_etree_formatter.py
index e33379c..a10d1e2 100644
--- a/tests/test_etree_formatter.py
+++ b/tests/test_etree_formatter.py
@@ -139,7 +139,7 @@ class TestFormatterSave(TestCase):
         video_stream = VideoStream(gst.Caps("video/x-raw-yuv"))
         audio_stream = AudioStream(gst.Caps("audio/x-raw-int"))
 
-        effect1 = EffectFactory ('identity', 'identity')
+        effect1 = EffectFactory('identity', 'identity')
         effect1.addOutputStream(video_stream)
         effect1.addInputStream(video_stream)
 
diff --git a/tests/test_factories_operation.py b/tests/test_factories_operation.py
index 23bb77b..0de343d 100644
--- a/tests/test_factories_operation.py
+++ b/tests/test_factories_operation.py
@@ -35,11 +35,11 @@ class TestEffectFactory(TestCase):
     def setUp(self):
         TestCase.setUp(self)
         self.stream = VideoStream(gst.Caps("video/x-raw-rgb"))
-        self.factory = EffectFactory ('identity', 'identity')
+        self.factory = EffectFactory('identity', 'identity')
         self.factory.addOutputStream(self.stream)
         self.factory.addInputStream(self.stream)
 
-    def testMakeBin (self):
+    def testMakeBin(self):
         bin = self.factory.makeBin()
         bin2 = self.factory.makeBin()
         csp = bin.elements().next()
diff --git a/tests/test_gap.py b/tests/test_gap.py
index ef41ad0..5b32ca3 100644
--- a/tests/test_gap.py
+++ b/tests/test_gap.py
@@ -179,12 +179,12 @@ class TestGap(TestCase):
         ])
 
         complex = [
-            ( 1 * gst.SECOND, 2 * gst.SECOND),
-            ( 6 * gst.SECOND, 2 * gst.SECOND),
+            (1 * gst.SECOND, 2 * gst.SECOND),
+            (6 * gst.SECOND, 2 * gst.SECOND),
             (10 * gst.SECOND, 2 * gst.SECOND),
-            ( 8 * gst.SECOND, 2 * gst.SECOND),
+            (8 * gst.SECOND, 2 * gst.SECOND),
             (14 * gst.SECOND, 1 * gst.SECOND),
-            ( 4 * gst.SECOND, 1 * gst.SECOND),
+            (4 * gst.SECOND, 1 * gst.SECOND),
         ]
 
         objs = []
@@ -198,9 +198,9 @@ class TestGap(TestCase):
             Gap.findAllGaps(objs)]
 
         self.assertEquals(result, [
-            ( 0 * gst.SECOND, 1 * gst.SECOND),
-            ( 3 * gst.SECOND, 1 * gst.SECOND),
-            ( 5 * gst.SECOND, 1 * gst.SECOND),
+            (0 * gst.SECOND, 1 * gst.SECOND),
+            (3 * gst.SECOND, 1 * gst.SECOND),
+            (5 * gst.SECOND, 1 * gst.SECOND),
             (12 * gst.SECOND, 2 * gst.SECOND),
         ])
 
@@ -217,6 +217,6 @@ class TestGap(TestCase):
             Gap.findAllGaps(objs)]
 
         self.assertEquals(result, [
-            ( 0 * gst.SECOND, 1 * gst.SECOND),
+            (0 * gst.SECOND, 1 * gst.SECOND),
             (12 * gst.SECOND, 2 * gst.SECOND),
         ])
diff --git a/win32/setup.py b/win32/setup.py
index 294acf6..98a8650 100644
--- a/win32/setup.py
+++ b/win32/setup.py
@@ -54,13 +54,13 @@ class Deploy():
         if not self.curr_dir.endswith('win32'):
             self.close("The script must be run from 'pitivi/win32'")
         self.root_dir = os.path.abspath(os.path.join(self.curr_dir,'..'))
-        self.dist_dir = os.path.join (self.root_dir, 'win32', 'dist')
-        self.dist_bin_dir = os.path.join (self.dist_dir, 'bin')
-        self.dist_etc_dir = os.path.join (self.dist_dir, 'etc')
-        self.dist_share_dir = os.path.join (self.dist_dir, 'share')
-        self.dist_share_pixmaps_dir = os.path.join (self.dist_share_dir, 'pitivi', 'pixmaps')
-        self.dist_lib_dir = os.path.join (self.dist_dir, 'lib')
-        self.dist_lib_pitivi_dir = os.path.join (self.dist_lib_dir, 'pitivi')
+        self.dist_dir = os.path.join(self.root_dir, 'win32', 'dist')
+        self.dist_bin_dir = os.path.join(self.dist_dir, 'bin')
+        self.dist_etc_dir = os.path.join(self.dist_dir, 'etc')
+        self.dist_share_dir = os.path.join(self.dist_dir, 'share')
+        self.dist_share_pixmaps_dir = os.path.join(self.dist_share_dir, 'pitivi', 'pixmaps')
+        self.dist_lib_dir = os.path.join(self.dist_dir, 'lib')
+        self.dist_lib_pitivi_dir = os.path.join(self.dist_lib_dir, 'pitivi')
 
     def setPath(self):
         # Add root folder to the python path for pitivi
@@ -138,33 +138,33 @@ class Deploy():
     def deployPitivi(self):
         print('Deploying PiTiVi')
         # Copy files autogenerated using autotools
-        shutil.copy (os.path.join(self.curr_dir, 'configure.py'),
+        shutil.copy(os.path.join(self.curr_dir, 'configure.py'),
             os.path.join(self.root_dir, 'pitivi'))
         # Copy ui files to lib/pitivi
         ui_dir = os.path.join(self.root_dir, 'pitivi', 'ui')
-        shutil.copy (os.path.join(ui_dir, 'mainwindow.xml'),
+        shutil.copy(os.path.join(ui_dir, 'mainwindow.xml'),
             os.path.join(self.dist_lib_pitivi_dir, 'mainwindow.xml'))
         for name in [x for x in os.listdir(ui_dir) if x.endswith('glade')]:
-            shutil.copy (os.path.join(ui_dir, name),
+            shutil.copy(os.path.join(ui_dir, name),
                     os.path.join(self.dist_lib_pitivi_dir, name))
         # Copy the pixmaps to the dist dir
         pitivi_pixmaps_dir = os.path.join(self.root_dir, 'pitivi', 'pixmaps')
         win32_pixmaps_dir = os.path.join(self.curr_dir, 'pixmaps')
         for name in os.listdir(pitivi_pixmaps_dir):
-            shutil.copy (os.path.join(pitivi_pixmaps_dir,name),
+            shutil.copy(os.path.join(pitivi_pixmaps_dir,name),
                     self.dist_share_pixmaps_dir)
         # Override SVG pixmaps with PNG pixmaps using the .svg extension
         # so they can be loaded if gdk doesn't support svg
         for name in os.listdir(win32_pixmaps_dir):
             out_name = name.replace('.png', '.svg')
-            shutil.copy (os.path.join(win32_pixmaps_dir, name),
+            shutil.copy(os.path.join(win32_pixmaps_dir, name),
                   os.path.join(self.dist_share_pixmaps_dir, out_name))
 
     def deployGStreamer(self):
         print ('Deploying GStreamer')
         # Copy gstreamer binaries to the dist folder
         for name in os.listdir(os.path.join(self.gstPath, 'bin')):
-            shutil.copy (os.path.join(self.gstPath, 'bin', name),
+            shutil.copy(os.path.join(self.gstPath, 'bin', name),
                     self.dist_bin_dir)
         shutil.copytree(os.path.join(self.gstPath, 'lib', 'gstreamer-0.10'),
              os.path.join(self.dist_lib_dir, 'gstreamer-0.10'))



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