Skip to content

Commit 0c8f61c

Browse files
committed
Update cookiecutter
1 parent 33de314 commit 0c8f61c

File tree

5 files changed

+27
-7
lines changed

5 files changed

+27
-7
lines changed
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/bin/env python3
22

3-
import click
4-
from packaging.version import parse
3+
from importlib import metadata
54

6-
if parse(click.__version__) < parse("8.1.1") or parse(click.__version__) >= parse("8.2"):
7-
print("🚧 Linting with mypy is currently only supported with click~=8.1.1. 🚧")
8-
print("🔧 Please run `pip install click~=8.1.1` first. 🔨")
9-
exit(1)
5+
from packaging.version import Version
6+
7+
if __name__ == "__main__":
8+
click_version = Version(metadata.version("click"))
9+
if click_version < Version("8.1.1"):
10+
print("🚧 Linting with mypy is currently only supported with click>=8.1.1. 🚧")
11+
print("🔧 Please run `pip install click>=8.1.1` first. 🔨")
12+
exit(1)

.github/workflows/collect_changes.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ jobs:
2525
python3 .ci/scripts/collect_changes.py
2626
- name: "Create Pull Request"
2727
uses: "peter-evans/create-pull-request@v7"
28+
id: "create_pr"
2829
with:
2930
token: "${{ secrets.RELEASE_TOKEN }}"
3031
title: "Update Changelog"
3132
body: ""
3233
branch: "update_changes"
3334
delete-branch: true
35+
- name: "Mark PR automerge"
36+
run: |
37+
gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}"
38+
if: "steps.create_pr.outputs.pull-request-number"
39+
env:
40+
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
41+
continue-on-error: true
3442
...

.github/workflows/release_branch.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,20 @@ jobs:
2626
.ci/scripts/create_release_branch.sh
2727
- name: "Create Pull Request"
2828
uses: "peter-evans/create-pull-request@v7"
29+
id: "create_pr"
2930
with:
3031
token: "${{ secrets.RELEASE_TOKEN }}"
3132
title: "Bump dev-version"
3233
body: ""
3334
branch: "bump_version"
3435
delete-branch: true
36+
- name: "Mark PR automerge"
37+
run: |
38+
gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}"
39+
if: "steps.create_pr.outputs.pull-request-number"
40+
env:
41+
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}"
42+
continue-on-error: true
3543
- name: "Add Backport Label for new Branch"
3644
uses: "actions/github-script@v7"
3745
with:

lint_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ black==25.1.0
33
flake8==7.2.0
44
flake8-pyproject==1.2.3
55
isort==6.0.1
6-
mypy==1.15.0
6+
mypy==1.16.0
77
shellcheck-py==0.10.0.1
88

99
# Type annotation stubs

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,4 @@ ignore = ["W503", "Q000", "Q003", "D100", "D104", "D106", "D200", "D202", "D205"
208208
# E401: multiple imports on one line
209209
extend-ignore = ["E203", "E401"]
210210
max-line-length = 100
211+

0 commit comments

Comments
 (0)