Skip to content

Commit 3aaf910

Browse files
committed
Merge branch 'main' into dcreager/overloads
* main: [red-knot] Add support for calling `type[…]` (#16597) Update migration guide with the new `ruff.configuration` (#16567) [red-knot] Add 'mypy_primer' workflow (#16554) Update Rust crate indoc to v2.0.6 (#16585) Update Rust crate syn to v2.0.100 (#16590) Update Rust crate thiserror to v2.0.12 (#16591) Update Rust crate serde_json to v1.0.140 (#16589) Update Rust crate quote to v1.0.39 (#16587) Update Rust crate serde to v1.0.219 (#16588) Update Rust crate proc-macro2 to v1.0.94 (#16586) Update Rust crate anyhow to v1.0.97 (#16584) Update dependency ruff to v0.9.10 (#16593) Update Rust crate unicode-ident to v1.0.18 (#16592) [red-knot] Do not ignore typeshed stubs for 'venv' module (#16596) [red-knot] Reduce Salsa lookups in `Type::find_name_in_mro` (#16582) Fix broken red-knot property tests (#16574) [red-knot] Consistent spelling of "metaclass" and "meta-type" (#16576)
2 parents 42188cd + c60e8a0 commit 3aaf910

File tree

15 files changed

+473
-182
lines changed

15 files changed

+473
-182
lines changed

.github/workflows/mypy_primer.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Run mypy_primer
2+
3+
permissions: {}
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- "crates/red_knot*/**"
9+
- "crates/ruff_db"
10+
- "crates/ruff_python_ast"
11+
- "crates/ruff_python_parser"
12+
- ".github/workflows/mypy_primer.yaml"
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
env:
19+
CARGO_INCREMENTAL: 0
20+
CARGO_NET_RETRY: 10
21+
CARGO_TERM_COLOR: always
22+
RUSTUP_MAX_RETRIES: 10
23+
24+
jobs:
25+
mypy_primer:
26+
name: Run mypy_primer
27+
runs-on: ubuntu-24.04
28+
timeout-minutes: 20
29+
steps:
30+
- uses: actions/checkout@v4
31+
with:
32+
path: ruff
33+
fetch-depth: 0
34+
persist-credentials: false
35+
36+
- name: Install the latest version of uv
37+
uses: astral-sh/setup-uv@v5
38+
39+
- uses: Swatinem/rust-cache@v2
40+
with:
41+
workspaces: "ruff"
42+
- name: Install Rust toolchain
43+
run: rustup show
44+
45+
- name: Run mypy_primer
46+
shell: bash
47+
run: |
48+
cd ruff
49+
50+
echo "new commit"
51+
git rev-list --format=%s --max-count=1 "$GITHUB_SHA"
52+
53+
MERGE_BASE="$(git merge-base "$GITHUB_SHA" "origin/$GITHUB_BASE_REF")"
54+
git checkout -b base_commit "$MERGE_BASE"
55+
echo "base commit"
56+
git rev-list --format=%s --max-count=1 base_commit
57+
58+
cd ..
59+
60+
echo "Running mypy_primer"
61+
62+
uvx --from "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support" mypy_primer \
63+
--repo ruff \
64+
--type-checker knot \
65+
--old base_commit \
66+
--new "$GITHUB_SHA" \
67+
--project-selector '/(mypy_primer|black|pyp|git-revise|zipp|arrow)$' \
68+
--output concise \
69+
--debug

0 commit comments

Comments
 (0)