From f157f96ad730fc7407c192a17aec4b5e23d7e137 Mon Sep 17 00:00:00 2001 From: natsuoto <279971144+natsuoto@users.noreply.github.com> Date: Tue, 28 Apr 2026 15:26:33 +0530 Subject: chore: modernize pre-commit hook configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pre-commit config was broken on three fronts: - `rev: main` / `rev: master` is rejected by modern pre-commit, which requires immutable tags (or a SHA) so hook versions are reproducible. - `gitlab.com/pycqa/flake8` was archived years ago. flake8 now lives at `github.com/PyCQA/flake8`. - `timothycrosley/isort` was renamed to `PyCQA/isort` and the old path no longer resolves reliably. Pin every hook to its current latest release and replace `psf/black` with `psf/black-pre-commit-mirror`, the upstream-recommended mirror that ships without black's full dependency tree (faster hook installs). - pre-commit/pre-commit-hooks → v6.0.0 - PyCQA/isort → 8.0.1 - psf/black-pre-commit-mirror → 26.3.1 - PyCQA/flake8 → 7.3.0 --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 367ccf6..17ac56d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,20 +5,20 @@ exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: main + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: debug-statements - - repo: https://github.com/timothycrosley/isort - rev: main + - repo: https://github.com/PyCQA/isort + rev: 8.0.1 hooks: - id: isort - - repo: https://github.com/psf/black - rev: main + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 hooks: - id: black - - repo: https://gitlab.com/pycqa/flake8 - rev: master + - repo: https://github.com/PyCQA/flake8 + rev: 7.3.0 hooks: - id: flake8 -- cgit v1.2.3