[pitivi] Fix pylint unbalanced-tuple-unpacking



commit 7a2ba880aa12163ad3cda34361cc07cd35950297
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Nov 1 08:50:41 2019 +0100

    Fix pylint unbalanced-tuple-unpacking

 pre-commit.hook             | 2 --
 tests/test_undo.py          | 2 +-
 tests/test_undo_timeline.py | 8 ++++----
 3 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/pre-commit.hook b/pre-commit.hook
index 652ea62a..41b1f1ae 100755
--- a/pre-commit.hook
+++ b/pre-commit.hook
@@ -25,8 +25,6 @@ pitivi/utils/validate.py
 pitivi/utils/widgets.py
 tests/common.py
 tests/test_project.py
-tests/test_undo.py
-tests/test_undo_timeline.py
 "
 
 PYLINT_IGNORE_ARGS=""
diff --git a/tests/test_undo.py b/tests/test_undo.py
index 7df991bb..c24c0a98 100644
--- a/tests/test_undo.py
+++ b/tests/test_undo.py
@@ -402,7 +402,7 @@ class TestGObjectObserver(common.TestCase):
     def test_property_change(self):
         action_log = UndoableActionLog()
         action_log.begin("complex stuff")
-        stack, = action_log.stacks
+        stack = action_log.stacks[0]
 
         clip = GES.TitleClip()
         clip.props.start = 1
diff --git a/tests/test_undo_timeline.py b/tests/test_undo_timeline.py
index 230ef5ad..772fc840 100644
--- a/tests/test_undo_timeline.py
+++ b/tests/test_undo_timeline.py
@@ -331,7 +331,7 @@ class TestLayerObserver(BaseTestUndoTimeline):
         with self.action_log.started("add clip"):
             self.layer.add_clip(clip1)
 
-        stack, = self.action_log.undo_stacks
+        stack = self.action_log.undo_stacks[0]
         self.assertEqual(len(stack.done_actions), 2, stack.done_actions)
         self.assertTrue(isinstance(stack.done_actions[0], ClipAdded))
         self.assertTrue(clip1 in self.getTimelineClips())
@@ -567,7 +567,7 @@ class TestLayerObserver(BaseTestUndoTimeline):
             self.layer.add_clip(clip2)
 
         # Make sure the transition asset is ignored.
-        stack, = self.action_log.undo_stacks
+        stack = self.action_log.undo_stacks[0]
         for action in stack.done_actions:
             self.assertNotIsInstance(action, AssetAddedAction,
                                      stack.done_actions)
@@ -1067,7 +1067,7 @@ class TestDragDropUndo(BaseTestUndoTimeline):
         self.check_layers(layers)
         self.assertEqual(layers[0].get_clips(), [clip])
 
-        stack, = self.action_log.undo_stacks
+        stack = self.action_log.undo_stacks[0]
         # Only the clip creation action should be on the stack.
         self.assertEqual(len(stack.done_actions), 1, stack.done_actions)
 
@@ -1111,7 +1111,7 @@ class TestDragDropUndo(BaseTestUndoTimeline):
         self.check_layers(layers)
         self.assertEqual(layers[0].get_clips(), [clip])
 
-        stack, = self.action_log.undo_stacks
+        stack = self.action_log.undo_stacks[0]
         # Only the clip creation action should be on the stack.
         self.assertEqual(len(stack.done_actions), 1, stack.done_actions)
 


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