Update pre-commit and its dependencies - #58
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the pinned pre-commit toolchain versions across the repository’s three synchronization points (pyproject.toml QA extra, conda/dev.yml, and .pre-commit-config.yaml) to reflect a pre-commit autoupdate run.
Changes:
- Bump Black, isort, and mypy pinned versions in
pyproject.tomlandconda/dev.yml. - Update the
revpins for the corresponding pre-commit hooks in.pre-commit-config.yaml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pyproject.toml |
Updates QA extra pins for Black/isort/mypy to match the updated pre-commit toolchain. |
conda/dev.yml |
Updates conda dev environment QA pins to stay in sync with the QA extra / pre-commit hook revisions. |
.pre-commit-config.yaml |
Updates hook rev pins, but introduces invalid YAML indentation in multiple repo blocks. |
Suppressed comments (4)
.pre-commit-config.yaml:20
- This repo block is indented inconsistently (and the
hookssequence is not nested underhooks:), which breaks YAML structure for pre-commit.
- repo: https://github.com/psf/black
rev: 26.5.1
hooks:
- id: black
.pre-commit-config.yaml:26
- This repo block is indented inconsistently (and the
hookssequence is not nested underhooks:), which breaks YAML structure for pre-commit.
- repo: https://github.com/PyCQA/isort
rev: 8.0.1
hooks:
- id: isort
.pre-commit-config.yaml:35
- The
hooks:value here is not a properly-indented YAML list, so pre-commit won't be able to parse this repo configuration.
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8
args: ["--config=.flake8"]
.pre-commit-config.yaml:43
- The
hooks:value here is not a properly-indented YAML list, so pre-commit won't be able to parse this repo configuration.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.3.0
hooks:
- id: mypy
args: ["--config=pyproject.toml"]
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
`pre-commit-update` rewrites .pre-commit-config.yaml with ruamel.yaml. With no configuration it falls back to `indent(sequence=4)`, leaving ruamel's default `offset=0`, which puts the `-` of every list item in column 0. The result is valid YAML that parses identically, but it reformats the entire file, strands the existing comments at their old indentation, and buries a four-line rev bump in a 32-line diff. Set `[tool.pre-commit-update.yaml]` in pyproject.toml, which the tool passes straight through to `ruamel.yaml.YAML.indent`, and restore the conventional ` - item` indentation in .pre-commit-config.yaml so the next automated update is a diff of just the revs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Okay @forsyth2, all yours. |
|
Thanks @xylar for setting this up. I will try to apply something similar for E3SM-Project/zppy#851, E3SM-Project/zstash#453, E3SM-Project/e3sm-comms#7 (note |
This PR was auto-generated to update pre-commit and its dependencies.
Closes #56