Skip to content

Commit da15b12

Browse files
[pre-commit.ci] pre-commit autoupdate (#177)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 70a565f commit da15b12

File tree

5 files changed

+36
-52
lines changed

5 files changed

+36
-52
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ jobs:
4141
with:
4242
flags: ${{ matrix.os }}
4343
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
44-
token: ${{ secrets.CODECOV_ORG_TOKEN }}

.pre-commit-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.14.10
3+
rev: v0.15.9
44
hooks:
55
- id: ruff-check
66
args: [--exit-non-zero-on-fix]
77

88
- repo: https://github.com/psf/black-pre-commit-mirror
9-
rev: 25.12.0
9+
rev: 26.3.1
1010
hooks:
1111
- id: black
1212

@@ -25,18 +25,18 @@ repos:
2525
- id: trailing-whitespace
2626

2727
- repo: https://github.com/python-jsonschema/check-jsonschema
28-
rev: 0.36.0
28+
rev: 0.37.1
2929
hooks:
3030
- id: check-dependabot
3131
- id: check-github-workflows
3232

3333
- repo: https://github.com/rhysd/actionlint
34-
rev: v1.7.10
34+
rev: v1.7.12
3535
hooks:
3636
- id: actionlint
3737

3838
- repo: https://github.com/pre-commit/mirrors-mypy
39-
rev: v1.19.1
39+
rev: v1.20.0
4040
hooks:
4141
- id: mypy
4242
args:
@@ -49,18 +49,18 @@ repos:
4949
pass_filenames: false
5050
additional_dependencies: ["types-requests"]
5151

52-
- repo: https://github.com/woodruffw/zizmor-pre-commit
53-
rev: v1.14.2
52+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
53+
rev: v1.23.1
5454
hooks:
5555
- id: zizmor
5656

5757
- repo: https://github.com/tox-dev/pyproject-fmt
58-
rev: v2.11.1
58+
rev: v2.21.0
5959
hooks:
6060
- id: pyproject-fmt
6161

6262
- repo: https://github.com/abravalheri/validate-pyproject
63-
rev: v0.24.1
63+
rev: v0.25
6464
hooks:
6565
- id: validate-pyproject
6666

@@ -70,7 +70,7 @@ repos:
7070
- id: tox-ini-fmt
7171

7272
- repo: https://github.com/codespell-project/codespell
73-
rev: v2.4.1
73+
rev: v2.4.2
7474
hooks:
7575
- id: codespell
7676
args: [--ignore-words-list=commitish]

cherry_picker/cherry_picker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,7 @@ def amend_commit_message(self, cherry_pick_branch):
398398
return updated_commit_message
399399

400400
def pause_after_committing(self, cherry_pick_branch):
401-
click.echo(
402-
f"""
401+
click.echo(f"""
403402
Finished cherry-pick {self.commit_sha1} into {cherry_pick_branch} \U0001f600
404403
--no-push option used.
405404
... Stopping here.
@@ -408,8 +407,7 @@ def pause_after_committing(self, cherry_pick_branch):
408407
409408
To abort the cherry-pick and cleanup:
410409
$ cherry_picker --abort
411-
"""
412-
)
410+
""")
413411
self.set_paused_state()
414412

415413
def push_to_remote(self, base_branch, head_branch, commit_message=""):

cherry_picker/test_cherry_picker.py

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ def tmp_git_repo_dir(tmpdir, cd, git_init, git_commit, git_config):
133133
try:
134134
git_init()
135135
except subprocess.CalledProcessError:
136-
version = subprocess.run(("git", "--version"), capture_output=True)
136+
git_version_cmd = "git", "--version"
137+
version = subprocess.run(git_version_cmd, capture_output=True)
137138
# the output looks like "git version 2.34.1"
138139
v = version.stdout.decode("utf-8").removeprefix("git version ").split(".")
139140
if (int(v[0]), int(v[1])) < (2, 28):
@@ -475,14 +476,12 @@ def test_find_config_not_git(tmpdir, cd):
475476

476477
def test_load_full_config(tmp_git_repo_dir, git_add, git_commit):
477478
relative_config_path = ".cherry_picker.toml"
478-
tmp_git_repo_dir.join(relative_config_path).write(
479-
"""\
479+
tmp_git_repo_dir.join(relative_config_path).write("""\
480480
team = "python"
481-
repo = "core-workfolow"
481+
repo = "core-workflow"
482482
check_sha = "5f007046b5d4766f971272a0cc99f8461215c1ec"
483483
default_branch = "devel"
484-
"""
485-
)
484+
""")
486485
git_add(relative_config_path)
487486
git_commit("Add config")
488487
scm_revision = get_sha1_from("HEAD")
@@ -491,7 +490,7 @@ def test_load_full_config(tmp_git_repo_dir, git_add, git_commit):
491490
scm_revision + ":" + relative_config_path,
492491
{
493492
"check_sha": "5f007046b5d4766f971272a0cc99f8461215c1ec",
494-
"repo": "core-workfolow",
493+
"repo": "core-workflow",
495494
"team": "python",
496495
"fix_commit_msg": True,
497496
"default_branch": "devel",
@@ -503,11 +502,9 @@ def test_load_full_config(tmp_git_repo_dir, git_add, git_commit):
503502

504503
def test_load_partial_config(tmp_git_repo_dir, git_add, git_commit):
505504
relative_config_path = ".cherry_picker.toml"
506-
tmp_git_repo_dir.join(relative_config_path).write(
507-
"""\
508-
repo = "core-workfolow"
509-
"""
510-
)
505+
tmp_git_repo_dir.join(relative_config_path).write("""\
506+
repo = "core-workflow"
507+
""")
511508
git_add(relative_config_path)
512509
git_commit("Add config")
513510
scm_revision = get_sha1_from("HEAD")
@@ -516,7 +513,7 @@ def test_load_partial_config(tmp_git_repo_dir, git_add, git_commit):
516513
f"{scm_revision}:{relative_config_path}",
517514
{
518515
"check_sha": "7f777ed95a19224294949e1b4ce56bbffcb1fe9f",
519-
"repo": "core-workfolow",
516+
"repo": "core-workflow",
520517
"team": "python",
521518
"fix_commit_msg": True,
522519
"default_branch": "main",
@@ -528,14 +525,12 @@ def test_load_partial_config(tmp_git_repo_dir, git_add, git_commit):
528525

529526
def test_load_config_no_head_sha(tmp_git_repo_dir, git_add, git_commit):
530527
relative_config_path = ".cherry_picker.toml"
531-
tmp_git_repo_dir.join(relative_config_path).write(
532-
"""\
528+
tmp_git_repo_dir.join(relative_config_path).write("""\
533529
team = "python"
534-
repo = "core-workfolow"
530+
repo = "core-workflow"
535531
check_sha = "5f007046b5d4766f971272a0cc99f8461215c1ec"
536532
default_branch = "devel"
537-
"""
538-
)
533+
""")
539534
git_add(relative_config_path)
540535
git_commit(f"Add {relative_config_path}")
541536

@@ -546,7 +541,7 @@ def test_load_config_no_head_sha(tmp_git_repo_dir, git_add, git_commit):
546541
":" + relative_config_path,
547542
{
548543
"check_sha": "5f007046b5d4766f971272a0cc99f8461215c1ec",
549-
"repo": "core-workfolow",
544+
"repo": "core-workflow",
550545
"team": "python",
551546
"fix_commit_msg": True,
552547
"default_branch": "devel",
@@ -572,8 +567,7 @@ def test_normalize_long_commit_message():
572567
title == "[3.6] Fix broken `Show Source` links on documentation pages (GH-3113)"
573568
)
574569
assert (
575-
body
576-
== """The `Show Source` was broken because of a change made in sphinx 1.5.1
570+
body == """The `Show Source` was broken because of a change made in sphinx 1.5.1
577571
In Sphinx 1.4.9, the sourcename was "index.txt".
578572
In Sphinx 1.5.1+, it is now "index.rst.txt".
579573
(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)
@@ -596,8 +590,7 @@ def test_normalize_short_commit_message():
596590
title == "[3.6] Fix broken `Show Source` links on documentation pages (GH-3113)"
597591
)
598592
assert (
599-
body
600-
== """(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)
593+
body == """(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)
601594
602595
603596
Co-authored-by: Elmar Ritsch <35851+elritsch@users.noreply.github.com>"""
@@ -775,12 +768,10 @@ def test_paused_flow(tmp_git_repo_dir, git_add, git_commit):
775768
initial_scm_revision = get_sha1_from("HEAD")
776769

777770
relative_file_path = "some.toml"
778-
tmp_git_repo_dir.join(relative_file_path).write(
779-
f"""\
771+
tmp_git_repo_dir.join(relative_file_path).write(f"""\
780772
check_sha = "{initial_scm_revision}"
781-
repo = "core-workfolow"
782-
"""
783-
)
773+
repo = "core-workflow"
774+
""")
784775
git_add(relative_file_path)
785776
git_commit("Add a config")
786777
config_scm_revision = get_sha1_from("HEAD")

pyproject.toml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,12 @@ optional-dependencies.dev = [
3939
urls.Homepage = "https://github.com/python/cherry-picker"
4040
scripts.cherry_picker = "cherry_picker.cherry_picker:cherry_pick_cli"
4141

42-
[tool.hatch.version]
43-
source = "vcs"
42+
[tool.hatch]
43+
build.hooks.vcs.version-file = "cherry_picker/_version.py"
44+
version.source = "vcs"
4445
# Change regex to match tags like "cherry-picker-v2.2.0".
45-
tag-pattern = '^cherry-picker-(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$'
46-
47-
[tool.hatch.build.hooks.vcs]
48-
version-file = "cherry_picker/_version.py"
49-
50-
[tool.hatch.version.raw-options]
51-
local_scheme = "no-local-version"
46+
version.tag-pattern = "^cherry-picker-(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$"
47+
version.raw-options.local_scheme = "no-local-version"
5248

5349
[tool.ruff]
5450
fix = true

0 commit comments

Comments
 (0)