[pitivi/thiblahute/pre_commit_ci: 128/128] Update pre-commit hooks




commit 204b6d3e8babdafa4810216b21bac7f814478fdf
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Jan 11 23:36:38 2021 +0100

    Update pre-commit hooks

 .pre-commit-config.yaml    | 14 +++++++-------
 pitivi/undo/undo.py        |  4 ++--
 pitivi/utils/loggable.py   |  1 +
 pitivi/utils/widgets.py    |  4 ++--
 tests/ptv_testsuite.py     |  1 +
 tests/test_project.py      |  2 +-
 tests/test_undo_project.py |  2 +-
 7 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9d2a97ecf..eda3816c4 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,11 +1,11 @@
 ---
 repos:
   - repo: https://github.com/pre-commit/pre-commit.git
-    rev: v1.20.0
+    rev: v2.9.3
     hooks:
       - id: validate_manifest
   - repo: https://github.com/pre-commit/pre-commit-hooks.git
-    rev: v2.4.0
+    rev: v3.4.0
     hooks:
       - id: check-yaml
       # Hooks able to fix small things.
@@ -17,7 +17,7 @@ repos:
       - id: check-docstring-first
       - id: debug-statements
   - repo: https://github.com/asottile/reorder_python_imports.git
-    rev: v1.8.0
+    rev: v2.3.6
     hooks:
       - id: reorder-python-imports
   - repo: https://github.com/pycqa/pydocstyle
@@ -29,7 +29,7 @@ repos:
           - --ignore=D1,D203,D213,D401,D406,D407,D413
         exclude: '.*pitivi/utils/extract.py$|.*pitivi/autoaligner.py$'
   - repo: https://gitlab.com/PyCQA/flake8
-    rev: 3.7.9
+    rev: 3.8.4
     hooks:
       - id: flake8
         args:
@@ -45,7 +45,7 @@ repos:
     hooks:
       - id: pylint
         name: pylint
-        entry: python3 -m pylint.__main__ --rcfile=pylint.rc
+        entry: python3 -m pylint.__main__ --rcfile=pylint.rc -j1
         language: system
         types: [python]
         exclude: >
@@ -56,14 +56,14 @@ repos:
             bin/pitivi.in
           )$
   - repo: https://github.com/adrienverge/yamllint.git
-    rev: v1.20.0
+    rev: v1.25.0
     hooks:
       - id: yamllint
         args:
           - -d
           - "{extends: default, rules: {line-length: disable}}"
   - repo: https://gitlab.com/devopshq/gitlab-ci-linter
-    rev: v1.0.0
+    rev: v1.0.1
     hooks:
       - id: gitlab-ci-linter
         args:
diff --git a/pitivi/undo/undo.py b/pitivi/undo/undo.py
index 339afe2ac..39de7b247 100644
--- a/pitivi/undo/undo.py
+++ b/pitivi/undo/undo.py
@@ -367,8 +367,8 @@ class UndoableActionLog(GObject.Object, Loggable):
                 stack = self.stacks.pop(-1)
             else:
                 stack = self.stacks[-1]
-        except IndexError:
-            raise UndoWrongStateError("No transaction")
+        except IndexError as e:
+            raise UndoWrongStateError("No transaction") from e
 
         return stack
 
diff --git a/pitivi/utils/loggable.py b/pitivi/utils/loggable.py
index 9ae91f410..94605e8af 100644
--- a/pitivi/utils/loggable.py
+++ b/pitivi/utils/loggable.py
@@ -478,6 +478,7 @@ def do_log(level, obj, category, message, args, where=-1, file_path=None, line=N
             try:
                 handler(level, obj, category, file_path, line, message)
             except TypeError as e:
+                # pylint: disable=raise-missing-from
                 raise SystemError("handler %r raised a TypeError: %s" % (
                     handler, get_exception_message(e)))
 
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index e85f41bcc..8581e8a8b 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -494,8 +494,8 @@ class ChoiceWidget(Gtk.Box, DynamicWidget):
     def set_widget_value(self, value):
         try:
             self.contents.set_active(self.values.index(value))
-        except ValueError:
-            raise ValueError("%r not in %r" % (value, self.values))
+        except ValueError as e:
+            raise ValueError("%r not in %r" % (value, self.values)) from e
 
     def get_widget_value(self):
         return self.values[self.contents.get_active()]
diff --git a/tests/ptv_testsuite.py b/tests/ptv_testsuite.py
index 74bd8706d..a379e7c23 100644
--- a/tests/ptv_testsuite.py
+++ b/tests/ptv_testsuite.py
@@ -28,6 +28,7 @@ sys.path.insert(0, os.path.join(CDIR, '..'))
 # Import tests so that the module is initialized
 import tests
 # pylint: disable=import-error
+# pylint: disable=wrong-import-order
 from launcher.baseclasses import Test
 
 
diff --git a/tests/test_project.py b/tests/test_project.py
index 62a7c851d..7b021e7bf 100644
--- a/tests/test_project.py
+++ b/tests/test_project.py
@@ -62,7 +62,7 @@ class ProjectManagerListener():
 class TestProjectManager(common.TestCase):
 
     def setUp(self):
-        super(TestProjectManager, self).setUp()
+        super().setUp()
         self.setup_app()
 
     def setup_app(self, app=None):
diff --git a/tests/test_undo_project.py b/tests/test_undo_project.py
index edfd72351..ca8a1da13 100644
--- a/tests/test_undo_project.py
+++ b/tests/test_undo_project.py
@@ -24,7 +24,7 @@ from tests import common
 class TestProjectUndo(common.TestCase):
 
     def setUp(self):
-        super(TestProjectUndo, self).setUp()
+        super().setUp()
         self.app = common.create_pitivi()
         self.project = self.app.project_manager.new_blank_project()
         self.action_log = self.app.action_log


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