Skip to content

Commit

Permalink
Merge branch 'master' into overloads-type-narrower-inference
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 17, 2025
2 parents da33c20 + c61bce4 commit ddc8612
Show file tree
Hide file tree
Showing 770 changed files with 30,875 additions and 10,830 deletions.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
f98f78216ba9d6ab68c8e69c19e9f3c7926c5efe
# run pyupgrade (#12711)
fc335cb16315964b923eb1927e3aad1516891c28
# update black to 23.3.0 (#15059)
4276308be01ea498d946a79554b4a10b1cf13ccb
# Update black to 24.1.1 (#16847)
8107e53158d83d30bb04d290ac10d8d3ccd344f8
4 changes: 3 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ on:
tags: ['*']

permissions:
contents: write
contents: read

jobs:
build-wheels:
if: github.repository == 'python/mypy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.11'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@ concurrency:
jobs:
docs:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TOXENV: docs
TOX_SKIP_MISSING_INTERPRETERS: False
VERIFY_MYPY_ERROR_CODES: 1
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.12'
- name: Install tox
run: pip install tox==4.11.0
run: pip install tox==4.21.2
- name: Setup tox environment
run: tox run -e ${{ env.TOXENV }} --notest
- name: Test
Expand Down
39 changes: 27 additions & 12 deletions .github/workflows/mypy_primer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ jobs:
mypy_primer:
name: Run mypy_primer
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
shard-index: [0, 1, 2, 3, 4]
fail-fast: false
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
path: mypy_to_test
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.12"
Expand Down Expand Up @@ -69,18 +69,33 @@ jobs:
--output concise \
| tee diff_${{ matrix.shard-index }}.txt
) || [ $? -eq 1 ]
- name: Upload mypy_primer diff
uses: actions/upload-artifact@v3
with:
name: mypy_primer_diffs
path: diff_${{ matrix.shard-index }}.txt
- if: ${{ matrix.shard-index }} == 0
- if: ${{ matrix.shard-index == 0 }}
name: Save PR number
run: |
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
- if: ${{ matrix.shard-index }} == 0
name: Upload PR number
uses: actions/upload-artifact@v3
- name: Upload mypy_primer diff + PR number
uses: actions/upload-artifact@v4
if: ${{ matrix.shard-index == 0 }}
with:
name: mypy_primer_diffs-${{ matrix.shard-index }}
path: |
diff_${{ matrix.shard-index }}.txt
pr_number.txt
- name: Upload mypy_primer diff
uses: actions/upload-artifact@v4
if: ${{ matrix.shard-index != 0 }}
with:
name: mypy_primer_diffs-${{ matrix.shard-index }}
path: diff_${{ matrix.shard-index }}.txt

join_artifacts:
name: Join artifacts
runs-on: ubuntu-latest
needs: [mypy_primer]
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: mypy_primer_diffs
path: pr_number.txt
pattern: mypy_primer_diffs-*
delete-merged: true
13 changes: 7 additions & 6 deletions .github/workflows/mypy_primer_comment.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: Comment with mypy_primer diff

on:
on: # zizmor: ignore[dangerous-triggers]
workflow_run:
workflows:
- Run mypy_primer
types:
- completed

permissions:
contents: read
pull-requests: write
permissions: {}

jobs:
comment:
name: Comment PR from mypy_primer
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download diffs
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const MAX_CHARACTERS = 30000
const MAX_CHARACTERS = 50000
const MAX_CHARACTERS_PER_PROJECT = MAX_CHARACTERS / 3
const fs = require('fs')
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/sync_typeshed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ on:
schedule:
- cron: "0 0 1,15 * *"

permissions:
contents: write
pull-requests: write
permissions: {}

jobs:
sync_typeshed:
name: Sync typeshed
if: github.repository == 'python/mypy'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true # needed to `git push` the PR branch
# TODO: use whatever solution ends up working for
# https://github.com/python/typeshed/issues/8434
- uses: actions/setup-python@v5
Expand Down
Loading

0 comments on commit ddc8612

Please sign in to comment.