Skip to content
Snippets Groups Projects
Commit 73a00d54 authored by Moul's avatar Moul
Browse files

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
parent 72834fdc
No related branches found
No related tags found
1 merge request!198Drop Py3.8, Add Py3.13, Bump pre-commit hooks and Pytest deps
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
......@@ -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}")
......
......@@ -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}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment