[pitivi] Remove parantheses from assert statements



commit e42f31facf521706dc75631c9e233f40d378b238
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun Apr 3 02:26:05 2016 +0200

    Remove parantheses from assert statements
    
    Differential Revision: https://phabricator.freedesktop.org/D855

 pitivi/clipproperties.py      |    6 +++---
 pitivi/medialibrary.py        |    2 +-
 pitivi/timeline/previewers.py |    4 ++--
 pitivi/titleeditor.py         |   14 +++++++-------
 pitivi/utils/widgets.py       |    4 ++--
 5 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 9ec121e..5bdbc4f 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -592,14 +592,14 @@ class TransformationProperties(Gtk.Expander, Loggable):
             return
 
         res, value = self.source.get_child_property(param.name)
-        assert(res)
+        assert res
         if spin.get_value() != value:
             spin.set_value(value)
 
     def _updateSpinButtons(self):
         for name, spinbtn in list(self.spin_buttons.items()):
             res, value = self.source.get_child_property(name)
-            assert(res)
+            assert res
             if name == "width":
                 self.default_values[name] = self._project.videowidth
             elif name == "height":
@@ -625,7 +625,7 @@ class TransformationProperties(Gtk.Expander, Loggable):
         value = spinbtn.get_value()
 
         res, cvalue = self.source.get_child_property(prop)
-        assert(res)
+        assert res
         if value != cvalue:
             self.app.action_log.begin("Transformation property change")
             self.source.set_child_property(prop, value)
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 5672359..4e089c3 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -1414,7 +1414,7 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
         self._project.disconnect_by_func(self.__projectSettingsSetFromImportedAssetCb)
 
     def _new_project_loading_cb(self, unused_project_manager, project):
-        assert (not self._project)
+        assert not self._project
 
         self._project = project
         self._resetErrorList()
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index 3e457f8..76f6f59 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -943,7 +943,7 @@ class PipelineCpuAdapter(Loggable):
                     self.pipeline.set_state(Gst.State.READY)
                     res, self.lastPos = self.pipeline.query_position(
                         Gst.Format.TIME)
-                    assert(res)
+                    assert res
                 return True
 
             if self.rate > 0.0:
@@ -956,7 +956,7 @@ class PipelineCpuAdapter(Loggable):
 
         if not self.ready:
             res, position = self.pipeline.query_position(Gst.Format.TIME)
-            assert(res)
+            assert res
         else:
             # This to avoid going back and forth from READY to PAUSED
             if self.rate > 0.5:
diff --git a/pitivi/titleeditor.py b/pitivi/titleeditor.py
index 8ffcf08..d1fe508 100644
--- a/pitivi/titleeditor.py
+++ b/pitivi/titleeditor.py
@@ -107,7 +107,7 @@ class TitleEditor(Loggable):
         self.action_log.begin("Title %s change" % name)
         self._setting_props = True
         try:
-            assert(self.source.set_child_property(name, value))
+            assert self.source.set_child_property(name, value)
         finally:
             self._setting_props = False
         self.action_log.commit()
@@ -217,12 +217,12 @@ class TitleEditor(Loggable):
         # Now that the clip is inserted in the timeline, it has a source which
         # can be used to set its properties.
         source = clip.get_children(False)[0]
-        assert(source.set_child_property("text", ""))
-        assert(source.set_child_property("foreground-color", BACKGROUND_DEFAULT_COLOR))
-        assert(source.set_child_property("color", FOREGROUND_DEFAULT_COLOR))
-        assert(source.set_child_property("font-desc", DEFAULT_FONT_DESCRIPTION))
-        assert(source.set_child_property("valignment", DEFAULT_VALIGNMENT))
-        assert(source.set_child_property("halignment", DEFAULT_HALIGNMENT))
+        assert source.set_child_property("text", "")
+        assert source.set_child_property("foreground-color", BACKGROUND_DEFAULT_COLOR)
+        assert source.set_child_property("color", FOREGROUND_DEFAULT_COLOR)
+        assert source.set_child_property("font-desc", DEFAULT_FONT_DESCRIPTION)
+        assert source.set_child_property("valignment", DEFAULT_VALIGNMENT)
+        assert source.set_child_property("halignment", DEFAULT_HALIGNMENT)
         # Select it so the Title editor becomes active.
         self._selection.setSelection([clip], SELECT)
 
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index 743236d..f30a393 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -715,7 +715,7 @@ class GstElementSettingsWidget(Gtk.Box, Loggable):
             keyframe_button = None
             if not isinstance(widget, (ToggleWidget, ChoiceWidget)):
                 res, element, pspec = self.element.lookup_child(prop.name)
-                assert(res)
+                assert res
                 binding = GstController.DirectControlBinding.new(
                     element, prop.name,
                     GstController.InterpolationControlSource())
@@ -741,7 +741,7 @@ class GstElementSettingsWidget(Gtk.Box, Loggable):
 
         widget = self.properties[pspec]
         res, value = self.element.get_child_property(pspec.name)
-        assert(res)
+        assert res
         widget.setWidgetValue(value)
 
     def __create_keyframe_toggle_button(self, prop, widget):


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