Skip to content

Commit 3f62bda

Browse files
authored
Merge pull request #58 from E3SM-Project/update-pre-commit-deps
Update pre-commit and its dependencies
2 parents 3a8d66c + 0dd1305 commit 3f62bda

3 files changed

Lines changed: 20 additions & 11 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
exclude: "docs|node_modules|migrations|.git|.tox"
2-
default_stages: [commit]
2+
default_stages: [pre-commit]
33
fail_fast: true
44

55
# make sure these always match dev.yml and qa in pyproject.toml
66
# (run `python scripts/sync_pre_commit_versions.py` to sync them)
77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v5.0.0
9+
rev: v6.0.0
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
@@ -15,13 +15,13 @@ repos:
1515

1616
# Can run individually with `pre-commit run black --all-files`
1717
- repo: https://github.com/psf/black
18-
rev: 25.1.0
18+
rev: 26.5.1
1919
hooks:
2020
- id: black
2121

2222
# Can run individually with `pre-commit run isort --all-files`
2323
- repo: https://github.com/PyCQA/isort
24-
rev: 6.0.1
24+
rev: 8.0.1
2525
hooks:
2626
- id: isort
2727

@@ -37,7 +37,7 @@ repos:
3737

3838
# Can run individually with `pre-commit run mypy --all-files`
3939
- repo: https://github.com/pre-commit/mirrors-mypy
40-
rev: v1.18.2
40+
rev: v2.3.0
4141
hooks:
4242
- id: mypy
4343
args: ["--config=pyproject.toml"]

‎conda/dev.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ dependencies:
4242
# `.pre-commit-config.yaml`, then run
4343
# `python scripts/sync_pre_commit_versions.py` to update the pinned versions
4444
# here and in the `qa` extra of pyproject.toml.
45-
- black ==25.1.0
45+
- black ==26.5.1
4646
- flake8 ==7.3.0
47-
- isort ==6.0.1
48-
- mypy ==1.18.2
47+
- isort ==8.0.1
48+
- mypy ==2.3.0
4949
- pre-commit ==4.3.0
5050
- types-PyYAML >=6.0.0
5151
# Developer Tools

‎pyproject.toml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ docs = [
4747
# make sure these always match dev.yml and .pre-commit-config.yaml
4848
# (run `python scripts/sync_pre_commit_versions.py` to sync them)
4949
qa = [
50-
"black==25.1.0",
50+
"black==26.5.1",
5151
"flake8==7.3.0",
5252
"flake8-isort==6.1.1",
53-
"isort==6.0.1",
54-
"mypy==1.18.2",
53+
"isort==8.0.1",
54+
"mypy==2.3.0",
5555
"pre-commit==4.3.0",
5656
"types-PyYAML >=6.0.0",
5757
]
@@ -61,6 +61,15 @@ dev = [
6161
"ipykernel",
6262
]
6363

64+
# `pre-commit-update` rewrites .pre-commit-config.yaml with ruamel.yaml. Without
65+
# this, it defaults to `indent(sequence=4)`, which puts the `-` of each list item
66+
# in column 0 and reformats the whole file. These settings keep its output in
67+
# the conventional ` - item` style, so an update is a diff of just the revs.
68+
[tool.pre-commit-update.yaml]
69+
mapping = 2
70+
sequence = 4
71+
offset = 2
72+
6473
[tool.black]
6574
line-length = 88
6675
target-version = ['py39']

0 commit comments

Comments
 (0)