From 8ea58ca2337f86ed447961fef7f4d5399bc514ab Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Mon, 3 Apr 2023 18:17:13 -0400 Subject: [PATCH 1/2] update black and hooks --- .pre-commit-config.yaml | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2c23bba2..0dcaca76d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: - id: pretty-format-json args: ['--autofix', '--no-ensure-ascii', '--no-sort-keys'] - repo: https://github.com/pappasam/toml-sort - rev: v0.22.4 + rev: v0.23.0 hooks: - id: toml-sort-fix - repo: https://github.com/pycqa/flake8 @@ -33,7 +33,7 @@ repos: additional_dependencies: ['flake8-rst-docstrings'] args: ['--config=setup.cfg'] - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black - repo: https://github.com/PyCQA/isort @@ -42,7 +42,7 @@ repos: - id: isort args: ['--settings-file=pyproject.toml', "--add_imports='from __future__ import annotations'"] - repo: https://github.com/nbQA-dev/nbQA - rev: 1.6.3 + rev: 1.7.0 hooks: - id: nbqa-black args: ['--target-version=py38'] @@ -66,9 +66,9 @@ repos: - id: blackdoc exclude: '(xclim/indices/__init__.py|docs/installation.rst)' additional_dependencies: - - 'black==23.1.0' + - 'black==23.3.0' - repo: https://github.com/adrienverge/yamllint.git - rev: v1.29.0 + rev: v1.30.0 hooks: - id: yamllint args: ['--config-file=.yamllint.yaml'] diff --git a/pyproject.toml b/pyproject.toml index de5711e26..14c7578ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ dependencies = [ [project.optional-dependencies] dev = [ # Dev tools and testing - "black >=23.1", + "black >=23.3.0", "blackdoc", "bump2version", "coverage[toml]", From 5a362702ac7fa23def70fd21d9db022c3e3bbaaa Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Mon, 3 Apr 2023 18:18:16 -0400 Subject: [PATCH 2/2] reorder hooks --- .pre-commit-config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0dcaca76d..5a7f52848 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,16 +26,21 @@ repos: rev: v0.23.0 hooks: - id: toml-sort-fix +- repo: https://github.com/adrienverge/yamllint.git + rev: v1.30.0 + hooks: + - id: yamllint + args: ['--config-file=.yamllint.yaml'] +- repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black - repo: https://github.com/pycqa/flake8 rev: 6.0.0 hooks: - id: flake8 additional_dependencies: ['flake8-rst-docstrings'] args: ['--config=setup.cfg'] -- repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - repo: https://github.com/PyCQA/isort rev: 5.12.0 hooks: @@ -67,11 +72,6 @@ repos: exclude: '(xclim/indices/__init__.py|docs/installation.rst)' additional_dependencies: - 'black==23.3.0' -- repo: https://github.com/adrienverge/yamllint.git - rev: v1.30.0 - hooks: - - id: yamllint - args: ['--config-file=.yamllint.yaml'] - repo: meta hooks: - id: check-hooks-apply