From 73a00d54566ef192978b67c6f64d54bce93f5ae2 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Tue, 29 Oct 2024 13:01:56 +0100
Subject: [PATCH] Bump pre-commit hooks

Pylint, fix `possibly-used-before-assignment` in examples,
and fix wrong variable name (s/insance/instance/g) :(

Use Pylint v3.2.7 https://github.com/pylint-dev/pylint/releases/tag/v3.2.7
because `too-many-positional-arguments` (5/5) has to be fixed
from v3.3.0 onward
---
 .pre-commit-config.yaml           | 14 +++++++-------
 examples/load_credentials_file.py |  4 ++--
 examples/load_scuttlebutt_file.py |  8 ++++----
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ef7f759..9ac0aec 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,7 +1,7 @@
 exclude: ^docs/
 repos:
 - repo: https://github.com/pre-commit/pre-commit-hooks
-  rev: v4.5.0
+  rev: v5.0.0
   hooks:
     - id: check-ast
     - id: check-merge-conflict
@@ -11,7 +11,7 @@ repos:
     - id: mixed-line-ending
     - id: trailing-whitespace
 -   repo: https://github.com/psf/black
-    rev: 24.1.1
+    rev: 24.10.0
     hooks:
     - id: black
 -   repo: https://github.com/PyCQA/isort
@@ -20,23 +20,23 @@ repos:
     - id: isort
       args: ["--profile", "black"]
 -   repo: https://github.com/pre-commit/mirrors-mypy
-    rev: v1.8.0
+    rev: v1.13.0
     hooks:
     - id: mypy
       args:
         - "--install-types"
         - "--non-interactive"
 -   repo: https://github.com/pylint-dev/pylint
-    rev: v3.0.3
+    rev: v3.2.7
     hooks:
     - id: pylint
 -   repo: https://github.com/asottile/pyupgrade
-    rev: v3.15.0
+    rev: v3.19.0
     hooks:
     - id: pyupgrade
       args: [--py39-plus]
 -   repo: https://github.com/Lucas-C/pre-commit-hooks
-    rev: v1.5.4
+    rev: v1.5.5
     hooks:
     - id: insert-license
       files: \.py$
@@ -53,6 +53,6 @@ repos:
         - "--project"
         - "clients/python/duniterpy"
 -   repo: https://github.com/executablebooks/mdformat
-    rev: 0.7.17
+    rev: 0.7.18
     hooks:
       - id: mdformat
diff --git a/examples/load_credentials_file.py b/examples/load_credentials_file.py
index d91e405..db374ca 100644
--- a/examples/load_credentials_file.py
+++ b/examples/load_credentials_file.py
@@ -27,8 +27,8 @@ def load_credentials_file(signing_key_instance=None):
         # capture filepath argument
         credentials_filepath = sys.argv[1]
 
-    # create SigningKey instance from file
-    signing_key_instance = SigningKey.from_credentials_file(credentials_filepath)
+        # create SigningKey instance from file
+        signing_key_instance = SigningKey.from_credentials_file(credentials_filepath)
 
     # print pubkey
     print(f"Public key from credentials file: {signing_key_instance.pubkey}")
diff --git a/examples/load_scuttlebutt_file.py b/examples/load_scuttlebutt_file.py
index 9ff5a03..fb4b142 100644
--- a/examples/load_scuttlebutt_file.py
+++ b/examples/load_scuttlebutt_file.py
@@ -18,8 +18,8 @@ import sys
 from duniterpy.key import SigningKey
 
 
-def load_scuttlebutt_file(signing_key_insance=None):
-    if not signing_key_insance:
+def load_scuttlebutt_file(signing_key_instance=None):
+    if not signing_key_instance:
         if len(sys.argv) < 2:
             print("Usage: python load_scuttlebutt_file.py FILEPATH")
             return
@@ -27,8 +27,8 @@ def load_scuttlebutt_file(signing_key_insance=None):
         # capture filepath argument
         scuttlebutt_filepath = sys.argv[1]
 
-    # create SigningKey instance from file
-    signing_key_instance = SigningKey.from_ssb_file(scuttlebutt_filepath)
+        # create SigningKey instance from file
+        signing_key_instance = SigningKey.from_ssb_file(scuttlebutt_filepath)
 
     # print pubkey
     print(f"Public key from scuttlebutt file: {signing_key_instance.pubkey}")
-- 
GitLab