From 7374f8d83c471cbc5a5061b89df4b8e41e83bc4f Mon Sep 17 00:00:00 2001 From: Romain Hugonnet Date: Wed, 13 Nov 2024 17:39:11 -0900 Subject: [PATCH] Update pre-commit hook versions --- .pre-commit-config.yaml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7bd04bc..af06fcb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: autoupdate_schedule: quarterly repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer @@ -12,10 +12,14 @@ repos: - id: check-merge-conflict # Fix common spelling mistakes - repo: https://github.com/codespell-project/codespell - rev: v2.2.1 + rev: v2.3.0 hooks: - id: codespell - args: [--ignore-words-list=alos, --ignore-regex=\bnin\b] + args: [ + '--ignore-words-list', 'alos,inout,vor', + '--ignore-regex', '\bnin\b', + '--' + ] types_or: [python, rst, markdown] files: ^(geoutils|doc|tests)/ @@ -27,23 +31,24 @@ repos: # Format the code aggressively using black - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 24.10.0 hooks: - id: black args: [--line-length=120] # Lint the code using flake8 - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 7.1.1 hooks: - id: flake8 args: [ - --max-line-length=120, - --extend-ignore=E203, # flake8 disagrees with black, so this should be ignored. + '--max-line-length', '120', # we can write dicts however we want + '--extend-ignore', 'E203,B028', # flake8 disagrees with black, so this should be ignored. + '--' ] additional_dependencies: - - flake8-comprehensions==3.1.0 - - flake8-bugbear==21.3.2 + - flake8-comprehensions + - flake8-bugbear files: ^(geoutils|tests) # Lint the code using mypy - repo: https://github.com/pre-commit/mirrors-mypy @@ -63,26 +68,26 @@ repos: --disable-error-code=var-annotated, --disable-error-code=no-any-return ] - additional_dependencies: [tokenize-rt==3.2.0, numpy==1.22] + additional_dependencies: [tokenize-rt==3.2.0, numpy==1.26] files: ^(geoutils|tests) # Sort imports using isort - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [ "--profile", "black" ] # Automatically upgrade syntax to a minimum version - repo: https://github.com/asottile/pyupgrade - rev: v3.1.0 + rev: v3.19.0 hooks: - id: pyupgrade args: [--py37-plus] # Various formattings - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: # Single backticks should apparently not be used - id: rst-backticks @@ -101,7 +106,7 @@ repos: # Add custom regex lints (see .relint.yml) - repo: https://github.com/codingjoe/relint - rev: 2.0.0 + rev: 3.3.1 hooks: - id: relint - repo: local