Skip to content

Commit 756ead2

Browse files
committed
Merge branch 'master' into state-rewrite
2 parents 888467a + 0a619ff commit 756ead2

File tree

103 files changed

+4111
-1452
lines changed

Some content is hidden

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

103 files changed

+4111
-1452
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Bug Report
22
description: Report broken or incorrect behaviour
33
labels: ["unconfirmed bug"]
4+
type: Bug
45
body:
56
- type: markdown
67
attributes:
@@ -59,6 +60,7 @@ body:
5960
This command required v1.1.0 or higher of the library. If this errors out then
6061
show some basic information involving your system such as operating system and
6162
Python version.
63+
render: bash
6264
validations:
6365
required: true
6466
- type: checkboxes

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Feature Request
22
description: Suggest a feature for this library
33
labels: ["feature request"]
4+
type: Feature
45
body:
56
- type: input
67
attributes:

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
| Version | Supported |
66
| ------- | ------------------ |
77
| 2.x | :white_check_mark: |
8-
| <2.0.0 | :x: |
8+
| <2.6.1 | :x: |
99

1010
## Reporting a Vulnerability
1111

.github/actions/sync-uv/action.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: 'Sync UV Action'
2+
description: 'Install and sync UV with specified groups and extras'
3+
author: 'Pycord Development <[email protected]>'
4+
inputs:
5+
groups:
6+
description: "Comma-separated list of groups to sync"
7+
required: false
8+
default: ''
9+
extras:
10+
description: "Comma-separated list of extras to sync"
11+
required: false
12+
default: ''
13+
frozen:
14+
description: "Whether to sync with frozen dependencies"
15+
required: false
16+
default: 'true'
17+
no_python_downloads:
18+
description: "Whether to avoid downloading Python versions"
19+
required: false
20+
default: 'true'
21+
22+
runs:
23+
using: "composite"
24+
steps:
25+
- name: "Install uv"
26+
uses: astral-sh/setup-uv@v7
27+
with:
28+
enable-cache: true
29+
30+
- name: "Run UV sync"
31+
shell: bash
32+
run: |
33+
cmd_args=("uv" "sync")
34+
35+
# groups
36+
set +e
37+
if [ -n "${{ inputs.groups }}" ]; then
38+
IFS=',' read -ra PARSED_GROUPS <<< "${{ inputs.groups }}"
39+
for group in "${PARSED_GROUPS[@]}"; do
40+
group=$(echo "$group" | xargs)
41+
if [ -n "$group" ]; then
42+
cmd_args+=("--group" "$group")
43+
fi
44+
done
45+
fi
46+
set -e
47+
echo "Groups: ${PARSED_GROUPS[*]}"
48+
49+
# extras
50+
set +e
51+
if [ -n "${{ inputs.extras }}" ]; then
52+
IFS=',' read -ra PARSED_EXTRAS <<< "${{ inputs.extras }}"
53+
for extra in "${PARSED_EXTRAS[@]}"; do
54+
extra=$(echo "$extra" | xargs)
55+
if [ -n "$extra" ]; then
56+
cmd_args+=("--extra" "$extra")
57+
fi
58+
done
59+
fi
60+
set -e
61+
echo "Extras: ${PARSED_EXTRAS[*]}"
62+
63+
echo "Executing: ${cmd_args[*]}"
64+
"${cmd_args[@]}"
65+
env:
66+
UV_NO_PYTHON_DOWNLOADS: ${{ inputs.no_python_downloads == 'true' && '1' || '' }}
67+
UV_FROZEN: ${{ inputs.frozen == 'true' && '1' || '' }}

.github/workflows/docs-checks.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ jobs:
4040
- name: "Setup Python"
4141
uses: actions/setup-python@v6
4242
with:
43-
python-version: "3.14"
44-
- name: "Install uv"
45-
uses: astral-sh/setup-uv@v7
43+
python-version: "3.13"
44+
- name: "Setup UV"
45+
uses: ./.github/actions/sync-uv
4646
with:
47-
enable-cache: true
48-
- name: Sync dependencies
49-
run: uv sync --no-python-downloads --group dev --group docs
47+
groups: 'dev,docs'
5048
- name: "Check Links"
5149
env:
5250
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build

.github/workflows/docs-localization-download.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ jobs:
1919
- name: "Setup Python"
2020
uses: actions/setup-python@v6
2121
with:
22-
python-version: "3.14"
23-
- name: "Install uv"
24-
uses: astral-sh/setup-uv@v7
22+
python-version: "3.13"
23+
- name: "Setup UV"
24+
uses: ./.github/actions/sync-uv
2525
with:
26-
enable-cache: true
27-
- name: Sync dependencies
28-
run: uv sync --no-python-downloads --group dev --group docs --extra speed --extra voice
26+
groups: 'dev,docs'
27+
extras: 'speed,voice'
2928
- name: "Get locales"
3029
env:
3130
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
@@ -41,7 +40,7 @@ jobs:
4140
working-directory: ./docs
4241
- name: "Crowdin"
4342
id: crowdin
44-
uses: crowdin/github-action@v2.11.0
43+
uses: crowdin/github-action@v2.12.0
4544
with:
4645
upload_sources: false
4746
upload_translations: false

.github/workflows/docs-localization-upload.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ jobs:
2424
- name: "Setup Python"
2525
uses: actions/setup-python@v6
2626
with:
27-
python-version: "3.14"
28-
- name: "Install uv"
29-
uses: astral-sh/setup-uv@v7
27+
python-version: "3.13"
28+
- name: "Setup UV"
29+
uses: ./.github/actions/sync-uv
3030
with:
31-
enable-cache: true
32-
- name: Sync dependencies
33-
run: uv sync --no-python-downloads --group dev --group docs --extra speed --extra voice
31+
groups: 'dev,docs'
32+
extras: 'speed,voice'
3433
- name: "Get locales"
3534
env:
3635
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
@@ -45,7 +44,7 @@ jobs:
4544
sphinx-intl update -p ./build/locales ${{ vars.SPHINX_LANGUAGES }}
4645
working-directory: ./docs
4746
- name: "Crowdin"
48-
uses: crowdin/github-action@v2.11.0
47+
uses: crowdin/github-action@v2.12.0
4948
with:
5049
upload_sources: true
5150
upload_translations: false

.github/workflows/lib-checks.yml

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,29 @@ jobs:
4040
- name: "Setup Python"
4141
uses: actions/setup-python@v6
4242
with:
43-
python-version: "3.14"
44-
- name: "Install uv"
45-
uses: astral-sh/setup-uv@v7
43+
python-version: "3.13"
44+
- name: "Setup UV"
45+
uses: ./.github/actions/sync-uv
4646
with:
47-
enable-cache: true
48-
- name: Sync dependencies
49-
run: uv sync --no-python-downloads --group dev
47+
groups: 'dev'
5048
- name: "Run codespell"
5149
run:
5250
uv run codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
5351
--exclude-file=".github/workflows/codespell.yml"
5452
ruff:
53+
if: ${{ github.event_name != 'schedule' }}
5554
runs-on: ubuntu-latest
5655
steps:
5756
- name: "Checkout Repository"
5857
uses: actions/checkout@v5
5958
- name: "Setup Python"
6059
uses: actions/setup-python@v6
6160
with:
62-
python-version: "3.14"
63-
- name: "Install uv"
64-
uses: astral-sh/setup-uv@v7
61+
python-version: "3.13"
62+
- name: "Setup UV"
63+
uses: ./.github/actions/sync-uv
6564
with:
66-
enable-cache: true
67-
- name: Sync dependencies
68-
run: uv sync --no-python-downloads --group dev
65+
groups: 'dev'
6966
- name: "Run ruff linter check"
7067
run: uv run ruff check .
7168
- name: "Run ruff formatter check"
@@ -79,13 +76,11 @@ jobs:
7976
- name: "Setup Python"
8077
uses: actions/setup-python@v6
8178
with:
82-
python-version: "3.14"
83-
- name: "Install uv"
84-
uses: astral-sh/setup-uv@v7
79+
python-version: "3.13"
80+
- name: "Setup UV"
81+
uses: ./.github/actions/sync-uv
8582
with:
86-
enable-cache: true
87-
- name: Sync dependencies
88-
run: uv sync --no-python-downloads --group dev
83+
groups: 'dev'
8984
- name: "Setup cache"
9085
id: cache-mypy
9186
uses: actions/cache@v4
@@ -97,3 +92,26 @@ jobs:
9792
run: mkdir -p -v .mypy_cache
9893
- name: "Run mypy"
9994
run: uv run mypy --non-interactive discord/
95+
tests:
96+
if: ${{ github.event_name != 'schedule' }}
97+
runs-on: ${{ matrix.os }}
98+
strategy:
99+
matrix:
100+
os: [ubuntu-latest, windows-latest, macos-latest]
101+
python-version: ['3.13', '3.12', '3.11', '3.10']
102+
steps:
103+
- name: "Checkout Repository"
104+
uses: actions/checkout@v5
105+
106+
- name: "Setup Python"
107+
uses: actions/setup-python@v6
108+
with:
109+
python-version: ${{ matrix.python-version }}
110+
111+
- name: "Setup UV"
112+
uses: ./.github/actions/sync-uv
113+
with:
114+
groups: 'dev'
115+
116+
- name: "Run tests"
117+
run: uv run tox

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
name: "Check PR Dependencies"
1818
steps:
1919
- name: PR Dependency Check
20-
uses: gregsdennis/[email protected]
20+
uses: gregsdennis/dependencies-action@ae6e0529ef70f1366a21972f40b1ad0e1b5e3218 # v1.4.1
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2323
semantic-title:
2424
name: "Check Semantic Title"
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: "Check Semantic Pull Request"
28-
uses: amannn/[email protected]
28+
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sync-guild-features.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ jobs:
2323
- name: "Setup Python"
2424
uses: actions/setup-python@v6
2525
with:
26-
python-version: "3.14"
27-
- name: "Install uv"
28-
uses: astral-sh/setup-uv@v7
26+
python-version: "3.13"
27+
- name: "Setup UV"
28+
uses: ./.github/actions/sync-uv
2929
with:
30-
enable-cache: true
31-
- name: Sync dependencies
32-
run: uv sync --no-python-downloads --group dev --group ci
30+
groups: 'dev,ci'
3331
- name: "Run guild features sync"
3432
run: uv run python -m scripts.sync_guild_features
3533
env:

0 commit comments

Comments
 (0)