Skip to content

Commit 5723ab5

Browse files
authored
Merge branch 'main' into rm-ellipsis
2 parents 5b00c05 + b7cee76 commit 5723ab5

1,664 files changed

Lines changed: 35271 additions & 8989 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.

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Y: Flake8 is only used to run flake8-pyi, everything else is in Ruff
33
select = Y
44
# Ignore rules normally excluded by default
5-
extend-ignore = Y090,Y091
5+
# Also ignore Y041 (redundant (complex |) float | int), see
6+
# https://github.com/python/typeshed/issues/16059
7+
extend-ignore = Y041,Y090,Y091
68
per-file-ignores =
79
# Generated protobuf files:
810
# Y021: Include docstrings

.github/workflows/daily.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Daily test
1+
name: Daily tests
22

33
on:
44
workflow_dispatch:
@@ -35,15 +35,15 @@ jobs:
3535
strategy:
3636
matrix:
3737
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
38-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
38+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
3939
exclude:
4040
# https://github.com/python/typeshed/issues/15694
4141
- os: "windows-latest"
4242
python-version: "3.10"
4343
fail-fast: false
4444

4545
steps:
46-
- uses: actions/checkout@v6
46+
- uses: actions/checkout@v7
4747
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
4848
uses: actions/setup-python@v6
4949
with:
@@ -67,7 +67,7 @@ jobs:
6767
shard-index: [0, 1, 2, 3]
6868
fail-fast: false
6969
steps:
70-
- uses: actions/checkout@v6
70+
- uses: actions/checkout@v7
7171
- uses: actions/setup-python@v6
7272
with:
7373
python-version: "3.13"
@@ -115,26 +115,22 @@ jobs:
115115
runs-on: ubuntu-latest
116116
steps:
117117
- name: Checkout typeshed
118-
uses: actions/checkout@v6
118+
uses: actions/checkout@v7
119119
with:
120120
path: typeshed
121121
- name: Checkout stub_uploader
122-
uses: actions/checkout@v6
122+
uses: actions/checkout@v7
123123
with:
124124
repository: typeshed-internal/stub_uploader
125125
path: stub_uploader
126-
- uses: actions/setup-python@v6
127-
with:
128-
# Keep in sync with stub_uploader's check_scripts.yml workflow.
129-
python-version: "3.13"
130-
- uses: astral-sh/setup-uv@v7
126+
- uses: astral-sh/setup-uv@v8.2.0
131127
with:
132128
version-file: "typeshed/requirements-tests.txt"
133129
- name: Run tests
134130
run: |
135131
cd stub_uploader
136-
uv pip install -r requirements.txt --system
137-
python -m pytest tests
132+
# Keep Python version in sync with stub_uploader's check_scripts.yml workflow.
133+
uv run --python=3.13 --no-project --with-requirements=requirements.txt -m pytest tests
138134
139135
# https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
140136
create-issue-on-failure:
@@ -145,7 +141,7 @@ jobs:
145141
permissions:
146142
issues: write
147143
steps:
148-
- uses: actions/github-script@v8
144+
- uses: actions/github-script@v9
149145
with:
150146
github-token: ${{ secrets.GITHUB_TOKEN }}
151147
script: |

.github/workflows/meta_tests.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This workflow is for testing typeshed's scripts and tests themselves
2-
name: Meta-tests
2+
name: Infrastructure tests
33

44
on:
55
workflow_dispatch:
@@ -28,35 +28,38 @@ concurrency:
2828

2929
jobs:
3030
mypy:
31-
name: Check scripts and tests with mypy
31+
name: "mypy: type check"
3232
runs-on: ubuntu-latest
3333
strategy:
3434
matrix:
3535
platform: ["linux", "win32"]
3636
fail-fast: false
3737
steps:
38-
- uses: actions/checkout@v6
39-
- uses: actions/setup-python@v6
40-
with:
41-
python-version: "3.13"
42-
- uses: astral-sh/setup-uv@v7
38+
- uses: actions/checkout@v7
39+
- uses: astral-sh/setup-uv@v8.2.0
4340
with:
4441
version-file: "requirements-tests.txt"
45-
- run: uv pip install -r requirements-tests.txt --system
46-
- run: python ./tests/typecheck_typeshed.py --platform=${{ matrix.platform }}
42+
- run: |
43+
uv run \
44+
--python=3.13 \
45+
--no-project \
46+
--with-requirements=requirements-tests.txt \
47+
./tests/typecheck_typeshed.py \
48+
--platform=${{ matrix.platform }}
49+
4750
pyright:
48-
name: Check scripts and tests with pyright
51+
name: "pyright: type check"
4952
runs-on: ubuntu-latest
5053
strategy:
5154
matrix:
5255
python-platform: ["Linux", "Windows"]
5356
fail-fast: false
5457
steps:
55-
- uses: actions/checkout@v6
58+
- uses: actions/checkout@v7
5659
- uses: actions/setup-python@v6
5760
with:
5861
python-version: "3.13"
59-
- uses: astral-sh/setup-uv@v7
62+
- uses: astral-sh/setup-uv@v8.2.0
6063
with:
6164
version-file: "requirements-tests.txt"
6265
- run: uv pip install -r requirements-tests.txt --system
@@ -67,20 +70,23 @@ jobs:
6770
python-platform: ${{ matrix.python-platform }}
6871
python-version: "3.10" # Oldest version supported for running scripts and tests
6972
project: ./pyrightconfig.scripts_and_tests.json
73+
7074
stubsabot-dry-run:
71-
name: Stubsabot dry run
75+
name: "stubsabot: dry run"
7276
runs-on: ubuntu-latest
7377
steps:
74-
- uses: actions/checkout@v6
75-
- uses: actions/setup-python@v6
76-
with:
77-
python-version: "3.13"
78-
- uses: astral-sh/setup-uv@v7
78+
- uses: actions/checkout@v7
79+
- uses: astral-sh/setup-uv@v8.2.0
7980
with:
8081
version-file: "requirements-tests.txt"
8182
- name: Git config
8283
run: |
8384
git config --global user.name stubsabot
8485
git config --global user.email '<>'
85-
- run: uv pip install -r requirements-tests.txt --system
86-
- run: python scripts/stubsabot.py --action-level local
86+
- run: |
87+
uv run \
88+
--python=3.13 \
89+
--no-project \
90+
--with-requirements=requirements-tests.txt \
91+
scripts/stubsabot.py \
92+
--action-level=local

.github/workflows/mypy_primer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run mypy_primer
1+
name: mypy_primer
22

33
on:
44
# Only run on PR, since we diff against main
@@ -22,10 +22,10 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
shard-index: [0, 1, 2, 3]
25+
shard-index: [0, 1, 2, 3, 4, 5]
2626
fail-fast: false
2727
steps:
28-
- uses: actions/checkout@v6
28+
- uses: actions/checkout@v7
2929
with:
3030
path: typeshed_to_test
3131
fetch-depth: 0
@@ -52,7 +52,7 @@ jobs:
5252
--new v${MYPY_VERSION} --old v${MYPY_VERSION} \
5353
--custom-typeshed-repo typeshed_to_test \
5454
--new-typeshed $GITHUB_SHA --old-typeshed upstream_main \
55-
--num-shards 4 --shard-index ${{ matrix.shard-index }} \
55+
--num-shards 6 --shard-index ${{ matrix.shard-index }} \
5656
--debug \
5757
--output concise \
5858
| tee diff_${{ matrix.shard-index }}.txt

.github/workflows/mypy_primer_comment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Comment with mypy_primer diff
1+
name: mypy_primer (comment)
22

33
on:
44
workflow_run:
55
workflows:
6-
- Run mypy_primer
6+
- mypy_primer
77
types:
88
- completed
99

@@ -18,7 +18,7 @@ jobs:
1818
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1919
steps:
2020
- name: Download diffs
21-
uses: actions/github-script@v8
21+
uses: actions/github-script@v9
2222
with:
2323
script: |
2424
const fs = require('fs');
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Post comment
4646
id: post-comment
47-
uses: actions/github-script@v8
47+
uses: actions/github-script@v9
4848
with:
4949
github-token: ${{ secrets.GITHUB_TOKEN }}
5050
script: |

.github/workflows/stubsabot.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run stubsabot daily
1+
name: Stubsabot
22

33
on:
44
workflow_dispatch:
@@ -19,25 +19,27 @@ jobs:
1919
if: github.repository == 'python/typeshed'
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@v7
2323
with:
2424
# use an ssh key so that checks automatically run on stubsabot PRs
2525
ssh-key: ${{ secrets.STUBSABOT_SSH_PRIVATE_KEY }}
2626
fetch-depth: 0
27-
- uses: actions/setup-python@v6
28-
with:
29-
python-version: "3.13"
30-
- uses: astral-sh/setup-uv@v7
27+
- uses: astral-sh/setup-uv@v8.2.0
3128
with:
3229
version-file: "requirements-tests.txt"
3330
- name: git config
3431
run: |
3532
git config --global user.name stubsabot
3633
git config --global user.email '<>'
37-
- name: Install dependencies
38-
run: uv pip install -r requirements-tests.txt --system
3934
- name: Run stubsabot
40-
run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python scripts/stubsabot.py --action-level everything
35+
run: |
36+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
37+
uv run \
38+
--python=3.13 \
39+
--no-project \
40+
--with-requirements=requirements-tests.txt \
41+
scripts/stubsabot.py \
42+
--action-level=everything
4143
4244
# https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
4345
create-issue-on-failure:
@@ -46,7 +48,7 @@ jobs:
4648
needs: [stubsabot]
4749
if: ${{ github.repository == 'python/typeshed' && always() && (needs.stubsabot.result == 'failure') }}
4850
steps:
49-
- uses: actions/github-script@v8
51+
- uses: actions/github-script@v9
5052
with:
5153
github-token: ${{ secrets.GITHUB_TOKEN }}
5254
script: |

.github/workflows/stubtest_stdlib.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Stdlib stubtest
1+
name: "Stubtest: stdlib"
22

33
on:
44
workflow_dispatch:
@@ -31,15 +31,15 @@ jobs:
3131
strategy:
3232
matrix:
3333
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
34-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
34+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
3535
exclude:
3636
# https://github.com/python/typeshed/issues/15694
3737
- os: "windows-latest"
3838
python-version: "3.10"
3939
fail-fast: false
4040

4141
steps:
42-
- uses: actions/checkout@v6
42+
- uses: actions/checkout@v7
4343
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
4444
uses: actions/setup-python@v6
4545
with:

.github/workflows/stubtest_third_party.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Third-party stubtest
1+
name: "Stubtest: third-party"
22

33
on:
44
pull_request:
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737

3838
steps:
39-
- uses: actions/checkout@v6
39+
- uses: actions/checkout@v7
4040
with:
4141
fetch-depth: 0
4242
- uses: actions/setup-python@v6

0 commit comments

Comments
 (0)