Skip to content

Commit 6b0f4c3

Browse files
committed
Merge branch 'master' into metaclass-conflict-check-improvements
2 parents b6c8eb9 + 5e9d657 commit 6b0f4c3

File tree

1,018 files changed

+59821
-22304
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,018 files changed

+59821
-22304
lines changed

.git-blame-ignore-revs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
f98f78216ba9d6ab68c8e69c19e9f3c7926c5efe
77
# run pyupgrade (#12711)
88
fc335cb16315964b923eb1927e3aad1516891c28
9+
# update black to 23.3.0 (#15059)
10+
4276308be01ea498d946a79554b4a10b1cf13ccb
11+
# Update black to 24.1.1 (#16847)
12+
8107e53158d83d30bb04d290ac10d8d3ccd344f8

.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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,20 @@ concurrency:
2828
jobs:
2929
docs:
3030
runs-on: ubuntu-latest
31+
timeout-minutes: 10
3132
env:
3233
TOXENV: docs
3334
TOX_SKIP_MISSING_INTERPRETERS: False
3435
VERIFY_MYPY_ERROR_CODES: 1
3536
steps:
3637
- uses: actions/checkout@v4
38+
with:
39+
persist-credentials: false
3740
- uses: actions/setup-python@v5
3841
with:
39-
python-version: '3.8'
42+
python-version: '3.12'
4043
- name: Install tox
41-
run: pip install tox==4.11.0
44+
run: pip install tox==4.26.0
4245
- name: Setup tox environment
4346
run: tox run -e ${{ env.TOXENV }} --notest
4447
- name: Test

.github/workflows/mypy_primer.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +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:
3331
shard-index: [0, 1, 2, 3, 4]
3432
fail-fast: false
33+
timeout-minutes: 60
3534
steps:
3635
- uses: actions/checkout@v4
3736
with:
3837
path: mypy_to_test
3938
fetch-depth: 0
39+
persist-credentials: false
4040
- uses: actions/setup-python@v5
4141
with:
42-
python-version: "3.12"
42+
python-version: "3.13"
4343
- name: Install dependencies
4444
run: |
4545
python -m pip install -U pip
@@ -69,18 +69,33 @@ jobs:
6969
--output concise \
7070
| tee diff_${{ matrix.shard-index }}.txt
7171
) || [ $? -eq 1 ]
72-
- name: Upload mypy_primer diff
73-
uses: actions/upload-artifact@v3
74-
with:
75-
name: mypy_primer_diffs
76-
path: diff_${{ matrix.shard-index }}.txt
77-
- if: ${{ matrix.shard-index }} == 0
72+
- if: ${{ matrix.shard-index == 0 }}
7873
name: Save PR number
7974
run: |
8075
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
81-
- if: ${{ matrix.shard-index }} == 0
82-
name: Upload PR number
83-
uses: actions/upload-artifact@v3
76+
- name: Upload mypy_primer diff + PR number
77+
uses: actions/upload-artifact@v4
78+
if: ${{ matrix.shard-index == 0 }}
79+
with:
80+
name: mypy_primer_diffs-${{ matrix.shard-index }}
81+
path: |
82+
diff_${{ matrix.shard-index }}.txt
83+
pr_number.txt
84+
- name: Upload mypy_primer diff
85+
uses: actions/upload-artifact@v4
86+
if: ${{ matrix.shard-index != 0 }}
87+
with:
88+
name: mypy_primer_diffs-${{ matrix.shard-index }}
89+
path: diff_${{ matrix.shard-index }}.txt
90+
91+
join_artifacts:
92+
name: Join artifacts
93+
runs-on: ubuntu-latest
94+
needs: [mypy_primer]
95+
steps:
96+
- name: Merge artifacts
97+
uses: actions/upload-artifact/merge@v4
8498
with:
8599
name: mypy_primer_diffs
86-
path: pr_number.txt
100+
pattern: mypy_primer_diffs-*
101+
delete-merged: true

.github/workflows/mypy_primer_comment.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
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
21-
uses: actions/github-script@v6
22+
uses: actions/github-script@v7
2223
with:
2324
script: |
2425
const fs = require('fs');
@@ -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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +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
18+
timeout-minutes: 10
1719
steps:
1820
- uses: actions/checkout@v4
1921
with:
2022
fetch-depth: 0
23+
persist-credentials: true # needed to `git push` the PR branch
2124
# TODO: use whatever solution ends up working for
2225
# https://github.com/python/typeshed/issues/8434
2326
- uses: actions/setup-python@v5

0 commit comments

Comments
 (0)