Skip to content

Commit 354df5a

Browse files
authored
Merge branch 'master' into abstract-callable
2 parents 388ba2a + a7bdffd commit 354df5a

File tree

1,298 files changed

+136173
-32706
lines changed

Some content is hidden

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

1,298 files changed

+136173
-32706
lines changed

.github/ISSUE_TEMPLATE/crash.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ labels: "crash"
1515

1616
**Traceback**
1717

18-
```
18+
```python-traceback
1919
(Insert traceback and other messages from mypy here -- use `--show-traceback`.)
2020
```
2121

@@ -25,6 +25,11 @@ labels: "crash"
2525
appreciated. We also very much appreciate it if you try to narrow the
2626
source down to a small stand-alone example.)
2727

28+
```python
29+
# Ideally, a small sample program that demonstrates the problem.
30+
# Or even better, a reproducible playground link https://mypy-play.net/ (use the "Gist" button)
31+
```
32+
2833
**Your Environment**
2934

3035
<!-- Include as many relevant details about the environment you experienced the bug in -->

.github/workflows/build_wheels.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ on:
66
tags: ['*']
77

88
permissions:
9-
contents: write
9+
contents: read
1010

1111
jobs:
1212
build-wheels:
1313
if: github.repository == 'python/mypy'
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
1719
- uses: actions/setup-python@v5
1820
with:
1921
python-version: '3.11'

.github/workflows/docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
# so it's important to do the docs build on all PRs touching mypy/errorcodes.py
1313
# in case somebody's adding a new error code without any docs
1414
- 'mypy/errorcodes.py'
15+
# Part of the documentation is automatically generated from the options
16+
# definitions in mypy/main.py
17+
- 'mypy/main.py'
1518
- 'mypyc/doc/**'
1619
- '**/*.rst'
1720
- '**/*.md'
@@ -35,11 +38,13 @@ jobs:
3538
VERIFY_MYPY_ERROR_CODES: 1
3639
steps:
3740
- uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
3843
- uses: actions/setup-python@v5
3944
with:
4045
python-version: '3.12'
4146
- name: Install tox
42-
run: pip install tox==4.21.2
47+
run: pip install tox==4.26.0
4348
- name: Setup tox environment
4449
run: tox run -e ${{ env.TOXENV }} --notest
4550
- name: Test

.github/workflows/mypy_primer.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,20 @@ jobs:
2626
mypy_primer:
2727
name: Run mypy_primer
2828
runs-on: ubuntu-latest
29-
permissions:
30-
contents: read
3129
strategy:
3230
matrix:
33-
shard-index: [0, 1, 2, 3, 4]
31+
shard-index: [0, 1, 2, 3, 4, 5]
3432
fail-fast: false
3533
timeout-minutes: 60
3634
steps:
3735
- uses: actions/checkout@v4
3836
with:
3937
path: mypy_to_test
4038
fetch-depth: 0
39+
persist-credentials: false
4140
- uses: actions/setup-python@v5
4241
with:
43-
python-version: "3.12"
42+
python-version: "3.14"
4443
- name: Install dependencies
4544
run: |
4645
python -m pip install -U pip
@@ -64,19 +63,20 @@ jobs:
6463
mypy_primer \
6564
--repo mypy_to_test \
6665
--new $GITHUB_SHA --old base_commit \
67-
--num-shards 5 --shard-index ${{ matrix.shard-index }} \
66+
--num-shards 6 --shard-index ${{ matrix.shard-index }} \
6867
--debug \
6968
--additional-flags="--debug-serialize" \
7069
--output concise \
70+
--mypy-install-librt \
7171
| tee diff_${{ matrix.shard-index }}.txt
7272
) || [ $? -eq 1 ]
7373
- if: ${{ matrix.shard-index == 0 }}
7474
name: Save PR number
7575
run: |
7676
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
77-
- if: ${{ matrix.shard-index == 0 }}
78-
name: Upload mypy_primer diff + PR number
77+
- name: Upload mypy_primer diff + PR number
7978
uses: actions/upload-artifact@v4
79+
if: ${{ matrix.shard-index == 0 }}
8080
with:
8181
name: mypy_primer_diffs-${{ matrix.shard-index }}
8282
path: |
@@ -93,8 +93,6 @@ jobs:
9393
name: Join artifacts
9494
runs-on: ubuntu-latest
9595
needs: [mypy_primer]
96-
permissions:
97-
contents: read
9896
steps:
9997
- name: Merge artifacts
10098
uses: actions/upload-artifact/merge@v4

.github/workflows/mypy_primer_comment.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
name: Comment with mypy_primer diff
22

3-
on:
3+
on: # zizmor: ignore[dangerous-triggers]
44
workflow_run:
55
workflows:
66
- Run mypy_primer
77
types:
88
- completed
99

10-
permissions:
11-
contents: read
12-
pull-requests: write
10+
permissions: {}
1311

1412
jobs:
1513
comment:
1614
name: Comment PR from mypy_primer
1715
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
pull-requests: write
1819
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1920
steps:
2021
- name: Download diffs
@@ -48,7 +49,7 @@ jobs:
4849
with:
4950
github-token: ${{ secrets.GITHUB_TOKEN }}
5051
script: |
51-
const MAX_CHARACTERS = 30000
52+
const MAX_CHARACTERS = 50000
5253
const MAX_CHARACTERS_PER_PROJECT = MAX_CHARACTERS / 3
5354
5455
const fs = require('fs')

.github/workflows/sync_typeshed.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@ on:
55
schedule:
66
- cron: "0 0 1,15 * *"
77

8-
permissions:
9-
contents: write
10-
pull-requests: write
8+
permissions: {}
119

1210
jobs:
1311
sync_typeshed:
1412
name: Sync typeshed
1513
if: github.repository == 'python/mypy'
1614
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
pull-requests: write
1718
timeout-minutes: 10
1819
steps:
1920
- uses: actions/checkout@v4
2021
with:
2122
fetch-depth: 0
23+
persist-credentials: true # needed to `git push` the PR branch
2224
# TODO: use whatever solution ends up working for
2325
# https://github.com/python/typeshed/issues/8434
2426
- uses: actions/setup-python@v5

0 commit comments

Comments
 (0)