Skip to content

Commit 714c4df

Browse files
Merge main into config-changes
Resolve conflicts with the Python 3.15 upgrade (#845), pycord 2.8 (#772) and the remindme removal (#825). The old config.py is dropped; main only changed its syntax. Also update the new config package to pass main's tooling: * Remove quoted annotations (ruff UP037) * Use lazy imports in cogs/config.py, as pycord reads annotations at runtime * Remove type-ignore comments that mypy 2.4 reports as unused
2 parents a381a8e + 891d6f3 commit 714c4df

94 files changed

Lines changed: 2253 additions & 2589 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/renovate.jsonc‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"assignAutomerge": false,
44
"automerge": true,
55
"configMigration": true,
6-
"dependencyDashboard": true,
7-
"dependencyDashboardAutoclose": true,
8-
"dependencyDashboardLabels": [
9-
"dependencies"
10-
],
6+
"dependencyDashboard": {
7+
"enabled": true,
8+
"autoclose": true,
9+
"labels": ["dependencies"]
10+
},
1111
"enabled": true,
1212
"enabledManagers": [
1313
"github-actions",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Automatically remove committee review label from closed PRs
2+
3+
"on":
4+
pull_request:
5+
types:
6+
- closed
7+
- converted_to_draft
8+
9+
concurrency: # yamllint disable-line rule:key-ordering
10+
cancel-in-progress: true
11+
group: ${{github.workflow}}-${{github.event.pull_request.number}}
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
labeler:
18+
if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.type
19+
!= 'Bot'
20+
name: Remove committee review label from closed PR
21+
permissions:
22+
pull-requests: write # Needed to remove the label
23+
24+
runs-on: ubuntu-latest
25+
steps:
26+
- env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
PR_REPO: ${{ github.repository }}
29+
PR_URL: ${{ github.event.pull_request.html_url }}
30+
name: Remove committee review label from closed PR
31+
run: gh pr edit "$PR_URL" --remove-label "awaiting committee review" --repo "$PR_REPO"

‎.github/workflows/autofix-pre-commit.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ permissions:
2020
jobs:
2121
autofix-pre-commit:
2222
env:
23-
UV_FROZEN: true
24-
UV_NO_SYNC: true
23+
UV_FROZEN: "true"
24+
UV_NO_SYNC: "true"
2525
UV_PYTHON_DOWNLOADS: never
2626
name: Run pre-commit hooks and commit any auto-fixes
2727
runs-on: ubuntu-latest
@@ -44,7 +44,7 @@ jobs:
4444
python-version-file: .python-version
4545

4646
- name: Install uv
47-
uses: astral-sh/setup-uv@v9.0.0
47+
uses: astral-sh/setup-uv@v10.4.0
4848
with:
4949
enable-cache: true
5050

@@ -77,7 +77,7 @@ jobs:
7777
ARGS=()
7878
fi
7979
80-
uv run -- prek run --all-files --hook-stage manual --color never --skip ruff-check --skip uv-lock "${ARGS[@]}" | tee /tmp/prek.log
80+
uv run -- prek run --all-files --hook-stage manual --color never --skip flake8 --skip ruff-check --skip uv-lock "${ARGS[@]}" | tee /tmp/prek.log
8181
8282
- name: Ensure no warnings
8383
run: "if grep -q '^warning: ' /tmp/prek.log; then exit 1; fi"

‎.github/workflows/check-build-deploy.yaml‎

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
persist-credentials: false
2727

2828
- name: Install uv
29-
uses: astral-sh/setup-uv@v9.0.0
29+
uses: astral-sh/setup-uv@v10.4.0
3030
with:
3131
enable-cache: true
3232

@@ -35,8 +35,8 @@ jobs:
3535

3636
flake8: # yamllint disable-line rule:key-ordering
3737
env:
38-
UV_FROZEN: true
39-
UV_NO_SYNC: true
38+
UV_FROZEN: "true"
39+
UV_NO_SYNC: "true"
4040
UV_PYTHON_DOWNLOADS: never
4141
name: Lint code with Flake8
4242
runs-on: ubuntu-latest
@@ -49,22 +49,23 @@ jobs:
4949
- name: Set up Python
5050
uses: actions/setup-python@v7
5151
with:
52-
python-version: 3.14
52+
python-version-file: .python-version
5353

5454
- name: Install uv
55-
uses: astral-sh/setup-uv@v9.0.0
55+
uses: astral-sh/setup-uv@v10.4.0
5656
with:
5757
enable-cache: true
5858

59+
- name: Install Flake8 from locked dependencies
60+
run: uv sync --only-group lint-format
61+
5962
- name: Run Flake8
60-
# TODO: Run from locked dependencies, once project's Python version has been updated to 3.14
61-
run: uvx --python 3.14 --with "flake8-carrot>=0.1.4" --with "flake8-pyproject>=1.2"
62-
-- flake8
63+
run: uv run -- flake8
6364

6465
mypy: # yamllint disable-line rule:key-ordering
6566
env:
66-
UV_FROZEN: true
67-
UV_NO_SYNC: true
67+
UV_FROZEN: "true"
68+
UV_NO_SYNC: "true"
6869
UV_PYTHON_DOWNLOADS: never
6970
name: Type-check code with mypy
7071
needs: [uv-check]
@@ -86,7 +87,7 @@ jobs:
8687
python-version-file: .python-version
8788

8889
- name: Install uv
89-
uses: astral-sh/setup-uv@v9.0.0
90+
uses: astral-sh/setup-uv@v10.4.0
9091
with:
9192
enable-cache: true
9293

@@ -129,7 +130,7 @@ jobs:
129130
pre-commit-PUSH: # yamllint disable-line rule:key-ordering
130131
if: github.event_name == 'push'
131132
name: Verify pre-commit hooks (push)
132-
uses: ./.github/workflows/autofix-pre-commit.yaml
133+
uses: $/.github/workflows/autofix-pre-commit.yaml
133134
with:
134135
skip-autofix: true
135136

@@ -154,8 +155,8 @@ jobs:
154155
155156
pymarkdown: # yamllint disable-line rule:key-ordering
156157
env:
157-
UV_FROZEN: true
158-
UV_NO_SYNC: true
158+
UV_FROZEN: "true"
159+
UV_NO_SYNC: "true"
159160
UV_PYTHON_DOWNLOADS: never
160161
name: Lint Markdown files using PyMarkdown
161162
runs-on: ubuntu-latest
@@ -171,7 +172,7 @@ jobs:
171172
python-version-file: .python-version
172173

173174
- name: Install uv
174-
uses: astral-sh/setup-uv@v9.0.0
175+
uses: astral-sh/setup-uv@v10.4.0
175176
with:
176177
enable-cache: true
177178

@@ -183,8 +184,8 @@ jobs:
183184

184185
pytest: # yamllint disable-line rule:key-ordering
185186
env:
186-
UV_FROZEN: true
187-
UV_NO_SYNC: true
187+
UV_FROZEN: "true"
188+
UV_NO_SYNC: "true"
188189
UV_PYTHON_DOWNLOADS: never
189190
name: Run test suite with pytest
190191
needs: [uv-check]
@@ -203,7 +204,7 @@ jobs:
203204
python-version-file: .python-version
204205

205206
- name: Install uv
206-
uses: astral-sh/setup-uv@v9.0.0
207+
uses: astral-sh/setup-uv@v10.4.0
207208
with:
208209
enable-cache: true
209210

@@ -238,8 +239,8 @@ jobs:
238239

239240
ruff-lint: # yamllint disable-line rule:key-ordering
240241
env:
241-
UV_FROZEN: true
242-
UV_NO_SYNC: true
242+
UV_FROZEN: "true"
243+
UV_NO_SYNC: "true"
243244
UV_PYTHON_DOWNLOADS: never
244245
name: Lint code with ruff
245246
runs-on: ubuntu-latest
@@ -255,7 +256,7 @@ jobs:
255256
python-version-file: .python-version
256257

257258
- name: Install uv
258-
uses: astral-sh/setup-uv@v9.0.0
259+
uses: astral-sh/setup-uv@v10.4.0
259260
with:
260261
enable-cache: true
261262

@@ -306,7 +307,7 @@ jobs:
306307

307308
steps:
308309
- name: Authenticate to container registry
309-
uses: docker/login-action@v4.6.0
310+
uses: docker/login-action@v4.8.0
310311
with:
311312
password: ${{secrets.GITHUB_TOKEN}}
312313
registry: ${{env.REGISTRY}}
@@ -357,4 +358,5 @@ jobs:
357358
RELEASE_REPOSITORY: ${{github.repository}}
358359
RELEASE_TAG: ${{github.ref_name}}
359360
run: gh release create "${RELEASE_TAG}" --repo "${RELEASE_REPOSITORY}" --verify-tag
360-
--generate-notes
361+
--generate-notes --notes "$(git tag -l --format='%(contents:subject)%0a%0a%(contents:body)'
362+
"${RELEASE_TAG}")"

‎.github/workflows/pr-auto-updater.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
permission-pull-requests: write
2727
private-key: ${{secrets.PR_AUTO_UPDATE_PRIVATE_KEY}} # zizmor: ignore[secrets-outside-env]
2828

29-
- uses: CSSUoB/pr-auto-updater@v3.0.0
29+
- uses: CSSUoB/pr-auto-updater@v5.0.0
3030
env: # yamllint disable-line rule:key-ordering
3131
GITHUB_TOKEN: ${{steps.generate-token.outputs.token}}
3232
MERGE_CONFLICT_ACTION: label

‎.github/workflows/prevent-migrations-deletion.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: xalvarez/prevent-file-change-action@v3.0.1
20+
- uses: xalvarez/prevent-file-change-action@v3.0.2
2121
with:
2222
allowNewFiles: true
2323
githubToken: ${{secrets.GITHUB_TOKEN}}

‎.pre-commit-config.yaml‎

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
default_install_hook_types: [pre-commit, commit-msg]
22
default_language_version:
3-
python: python3.13
3+
python: python3.15
44
default_stages: [pre-commit, pre-merge-commit, manual]
55

66
repos:
77
- repo: https://github.com/astral-sh/uv-pre-commit
8-
rev: 0.11.29
8+
rev: 0.13.8
99
hooks:
1010
- id: uv-lock
1111
always_run: true
@@ -21,7 +21,7 @@ repos:
2121
- id: codespell
2222

2323
- repo: https://github.com/tombi-toml/tombi-pre-commit
24-
rev: v1.2.0
24+
rev: v1.11.2
2525
hooks:
2626
- exclude: \A.+\.lock\Z
2727
id: tombi-format
@@ -32,21 +32,20 @@ repos:
3232
hooks:
3333
- id: sync-with-uv
3434

35-
- repo: https://github.com/rhysd/actionlint
36-
rev: v1.7.12
35+
- repo: https://github.com/kjanat/actionlint
36+
rev: v1.17.0
3737
hooks:
38-
- id: actionlint
39-
additional_dependencies: [github.com/wasilibs/go-shellcheck/cmd/shellcheck@latest] # yamllint disable-line rule:key-ordering
38+
- id: actionlint-shellcheck
4039
args: [-pyflakes=]
4140

4241
- repo: https://github.com/zizmorcore/zizmor-pre-commit
43-
rev: v1.27.0
42+
rev: v1.32.0
4443
hooks:
4544
- id: zizmor
4645
args: [--no-progress, --fix, --persona=auditor]
4746

4847
- repo: https://github.com/hadolint/hadolint
49-
rev: v2.14.0
48+
rev: v2.15.1
5049
hooks:
5150
- id: hadolint-docker
5251

@@ -57,14 +56,14 @@ repos:
5756
args: [--strict]
5857

5958
- repo: https://github.com/renovatebot/pre-commit-hooks
60-
rev: 43.265.3
59+
rev: 44.247.0
6160
hooks:
6261
- id: renovate-config-validator
6362
args: [--strict]
6463
stages: [manual]
6564

6665
- repo: https://github.com/python-jsonschema/check-jsonschema
67-
rev: 0.37.4
66+
rev: 0.39.0
6867
hooks:
6968
- id: check-jsonschema
7069
args: [--schemafile, 'https://json.schemastore.org/yamllint.json'] # yamllint disable-line rule:quoted-strings
@@ -78,36 +77,37 @@ repos:
7877
- id: gitlint
7978
- id: gitlint-ci
8079

81-
- repo: https://github.com/pre-commit/pre-commit-hooks
82-
rev: v6.0.0
83-
hooks:
84-
- id: check-illegal-windows-names
85-
- id: check-shebang-scripts-are-executable
86-
- id: check-vcs-permalinks
87-
- id: destroyed-symlinks
88-
- id: check-case-conflict
89-
- id: name-tests-test
90-
args: [--pytest-test-first]
91-
files: (?:^|\/)tests\/(?:[^\/]+\/)*(?!_)[^\/]+\.py$ # yamllint disable-line rule:key-ordering
92-
- id: pretty-format-json
93-
args: [--autofix, --indent, "4"]
94-
9580
- repo: builtin
9681
hooks:
9782
- id: check-added-large-files
98-
- id: trailing-whitespace
83+
- id: check-case-conflict
9984
- id: check-executables-have-shebangs
85+
- id: check-illegal-windows-names
10086
- id: check-json
87+
- id: check-jsonc
88+
- id: check-merge-conflict
89+
- id: check-shebang-scripts-are-executable
90+
- id: check-symlinks
10191
- id: check-toml
92+
- id: check-vcs-permalinks
93+
- id: check-xml
10294
- id: check-yaml
95+
- id: destroyed-symlinks
96+
- id: detect-private-key
10397
- id: end-of-file-fixer
104-
- id: check-xml
105-
- id: check-symlinks
106-
- id: check-merge-conflict
98+
- id: fix-byte-order-marker
10799
- id: mixed-line-ending
108100
args: [--fix=lf]
109-
- id: detect-private-key
110-
- id: fix-byte-order-marker
101+
- id: pretty-format-json
102+
args: [--autofix, --indent, "4"]
103+
- id: require-filename-pattern
104+
files: (^|/)tests/(?!(?:.+/)?_[a-z_]+/).+\.py$ # yamllint disable-line rule:key-ordering
105+
args:
106+
- ^test_.*\.py$
107+
- ^__init__\.py$
108+
- ^conftest\.py$
109+
- ^_.*\.py$
110+
- id: trailing-whitespace
111111

112112
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
113113
rev: v2.16.0
@@ -116,12 +116,18 @@ repos:
116116
args: [--autofix]
117117

118118
- repo: https://github.com/astral-sh/ruff-pre-commit
119-
rev: v0.16.1
119+
rev: v0.17.6
120120
hooks:
121121
- id: ruff-check
122122
args: [--fix]
123123
- id: ruff-format
124124

125+
- repo: https://github.com/pycqa/flake8
126+
rev: 7.5.0
127+
hooks:
128+
- id: flake8
129+
additional_dependencies: [flake8-pyproject, flake8-carrot] # yamllint disable-line rule:key-ordering
130+
125131
- repo: https://github.com/google/yamlfmt
126132
rev: v0.21.0
127133
hooks:

‎.python-version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13
1+
3.15

0 commit comments

Comments
 (0)