Skip to content

Commit 1083ab8

Browse files
authored
chore(deps): keep the black and isort versions of CI and hooks in step (#172)
Merging this moves the black and isort pre-commit hooks to 26.10.0 and 9.0.2, the versions CI installs since #170 and #171, and makes Renovate update black and isort in `requirements-dev.txt` and `.pre-commit-config.yaml` in one pull request (the `>=` floors in `pyproject.toml` get no update from Renovate and stay as they are). The hooks and the CI formatter check then use the same versions again. ## Summary - #169 pinned black and isort in `requirements-dev.txt` to the hook versions. Renovate then bumped only `requirements-dev.txt` (#170, #171): its pre-commit manager is disabled by default, so the hook revs never move. - `renovate.json` enables the pre-commit manager (the organisation preset `netresearch/renovate-config` does the same) and groups every black and isort dependency (`black`, `psf/black`, `isort`, `PyCQA/isort`) under one group. - `.pre-commit-config.yaml`: black rev 26.5.1 → 26.10.0, isort rev 8.0.1 → 9.0.2. The tree is already formatted for both: `pre-commit run black --all-files` and `pre-commit run isort --all-files` pass without changing a file. ## Linked issues / PRs Follows #169, #170 and #171. ## Type of change - [x] Chore / CI / deps (`chore:`) ## Test plan - [x] `bunx --package renovate renovate-config-validator renovate.json` (valid) - [x] `pre-commit run black --all-files` and `pre-commit run isort --all-files` with the new revs (pass, no file changed) ## Checklist - [x] Conventional Commits (`type(scope): description`) - [x] Commits signed (`git commit -S --signoff`) - [x] `CHANGELOG.md` updated for user-visible changes (none) - [x] Relevant `AGENTS.md` files updated if structure / commands changed (none) - [x] No secrets, credentials, or PII committed _Assisted by claude-code:claude-opus-5-5 — [Session](https://claude.ai/code/session_018YeAfZRDbYWzRMVUPmZDXj)_
2 parents 2de0412 + 88283a4 commit 1083ab8

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ repos:
2525
files: ^(cli_audit/|tests/|audit\.py$)
2626

2727
- repo: https://github.com/PyCQA/isort
28-
rev: 8.0.1
28+
rev: 9.0.2
2929
hooks:
3030
- id: isort
3131
files: ^(cli_audit/|tests/|audit\.py$)
3232
args: ['--profile=black']
3333

3434
- repo: https://github.com/psf/black
35-
rev: 26.5.1
35+
rev: 26.10.0
3636
hooks:
3737
- id: black
3838
files: ^(cli_audit/|tests/|audit\.py$)

‎renovate.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,18 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
44
"config:recommended"
5+
],
6+
"pre-commit": {
7+
"enabled": true
8+
},
9+
"packageRules": [
10+
{
11+
"description": "black and isort run twice: as pre-commit hooks (.pre-commit-config.yaml) and in CI from requirements-dev.txt. Update every copy in one pull request so the hook and CI format alike.",
12+
"matchPackageNames": [
13+
"/^(psf\\/)?black$/i",
14+
"/^(pycqa\\/)?isort$/i"
15+
],
16+
"groupName": "black and isort"
17+
}
518
]
619
}

0 commit comments

Comments
 (0)