Skip to content

Commit 223f24a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into infer-return-type
2 parents 35f4a75 + 6a5533c commit 223f24a

File tree

318 files changed

+10273
-2002
lines changed

Some content is hidden

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

318 files changed

+10273
-2002
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
blank_issues_enabled: true
22
contact_links:
3+
- name: Report an issue with ty
4+
url: https://github.com/astral-sh/ty/issues/new/choose
5+
about: Please report issues for our type checker ty in the ty repository.
36
- name: Documentation
47
url: https://docs.astral.sh/ruff
58
about: Please consult the documentation before creating an issue.

.github/mypy-primer-ty.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#:schema ../ty.schema.json
2+
# Configuration overrides for the mypy primer run
3+
4+
# Enable off-by-default rules.
5+
[rules]
6+
possibly-unresolved-reference = "warn"

.github/workflows/build-binaries.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
submodules: recursive
4545
persist-credentials: false
46-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
46+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4747
with:
4848
python-version: ${{ env.PYTHON_VERSION }}
4949
- name: "Prep README.md"
@@ -72,7 +72,7 @@ jobs:
7272
with:
7373
submodules: recursive
7474
persist-credentials: false
75-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
75+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
7676
with:
7777
python-version: ${{ env.PYTHON_VERSION }}
7878
architecture: x64
@@ -114,7 +114,7 @@ jobs:
114114
with:
115115
submodules: recursive
116116
persist-credentials: false
117-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
117+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
118118
with:
119119
python-version: ${{ env.PYTHON_VERSION }}
120120
architecture: arm64
@@ -170,7 +170,7 @@ jobs:
170170
with:
171171
submodules: recursive
172172
persist-credentials: false
173-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
173+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
174174
with:
175175
python-version: ${{ env.PYTHON_VERSION }}
176176
architecture: ${{ matrix.platform.arch }}
@@ -223,7 +223,7 @@ jobs:
223223
with:
224224
submodules: recursive
225225
persist-credentials: false
226-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
226+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
227227
with:
228228
python-version: ${{ env.PYTHON_VERSION }}
229229
architecture: x64
@@ -298,7 +298,7 @@ jobs:
298298
with:
299299
submodules: recursive
300300
persist-credentials: false
301-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
301+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
302302
with:
303303
python-version: ${{ env.PYTHON_VERSION }}
304304
- name: "Prep README.md"
@@ -363,7 +363,7 @@ jobs:
363363
with:
364364
submodules: recursive
365365
persist-credentials: false
366-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
366+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
367367
with:
368368
python-version: ${{ env.PYTHON_VERSION }}
369369
architecture: x64
@@ -429,7 +429,7 @@ jobs:
429429
with:
430430
submodules: recursive
431431
persist-credentials: false
432-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
432+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
433433
with:
434434
python-version: ${{ env.PYTHON_VERSION }}
435435
- name: "Prep README.md"

.github/workflows/build-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
if: ${{ inputs.plan != '' && !fromJson(inputs.plan).announcement_tag_is_implicit }}
114114
steps:
115115
- name: Download digests
116-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
116+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
117117
with:
118118
path: /tmp/digests
119119
pattern: digests-*
@@ -256,7 +256,7 @@ jobs:
256256
if: ${{ inputs.plan != '' && !fromJson(inputs.plan).announcement_tag_is_implicit }}
257257
steps:
258258
- name: Download digests
259-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
259+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
260260
with:
261261
path: /tmp/digests
262262
pattern: digests-*

.github/workflows/ci.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ jobs:
239239
- name: "Install mold"
240240
uses: rui314/setup-mold@e16410e7f8d9e167b74ad5697a9089a35126eb50 # v1
241241
- name: "Install cargo nextest"
242-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
242+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
243243
with:
244244
tool: cargo-nextest
245245
- name: "Install cargo insta"
246-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
246+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
247247
with:
248248
tool: cargo-insta
249249
- name: ty mdtests (GitHub annotations)
@@ -297,11 +297,11 @@ jobs:
297297
- name: "Install mold"
298298
uses: rui314/setup-mold@e16410e7f8d9e167b74ad5697a9089a35126eb50 # v1
299299
- name: "Install cargo nextest"
300-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
300+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
301301
with:
302302
tool: cargo-nextest
303303
- name: "Install cargo insta"
304-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
304+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
305305
with:
306306
tool: cargo-insta
307307
- name: "Run tests"
@@ -324,7 +324,7 @@ jobs:
324324
- name: "Install Rust toolchain"
325325
run: rustup show
326326
- name: "Install cargo nextest"
327-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
327+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
328328
with:
329329
tool: cargo-nextest
330330
- name: "Run tests"
@@ -407,11 +407,11 @@ jobs:
407407
- name: "Install mold"
408408
uses: rui314/setup-mold@e16410e7f8d9e167b74ad5697a9089a35126eb50 # v1
409409
- name: "Install cargo nextest"
410-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
410+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
411411
with:
412412
tool: cargo-nextest
413413
- name: "Install cargo insta"
414-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
414+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
415415
with:
416416
tool: cargo-insta
417417
- name: "Run tests"
@@ -460,7 +460,7 @@ jobs:
460460
with:
461461
persist-credentials: false
462462
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
463-
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
463+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
464464
name: Download Ruff binary to test
465465
id: download-cached-binary
466466
with:
@@ -525,11 +525,11 @@ jobs:
525525
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
526526
with:
527527
persist-credentials: false
528-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
528+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
529529
with:
530530
python-version: ${{ env.PYTHON_VERSION }}
531531

532-
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
532+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
533533
name: Download comparison Ruff binary
534534
id: ruff-target
535535
with:
@@ -649,7 +649,7 @@ jobs:
649649
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
650650
with:
651651
persist-credentials: false
652-
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
652+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
653653
name: Download new ty binary
654654
id: ty-new
655655
with:
@@ -705,7 +705,7 @@ jobs:
705705
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
706706
with:
707707
persist-credentials: false
708-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
708+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
709709
with:
710710
python-version: ${{ env.PYTHON_VERSION }}
711711
architecture: x64
@@ -759,7 +759,7 @@ jobs:
759759
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
760760
with:
761761
persist-credentials: false
762-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
762+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
763763
with:
764764
python-version: "3.13"
765765
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
@@ -830,12 +830,12 @@ jobs:
830830
persist-credentials: false
831831
repository: "astral-sh/ruff-lsp"
832832

833-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
833+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
834834
with:
835835
# installation fails on 3.13 and newer
836836
python-version: "3.12"
837837

838-
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
838+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
839839
name: Download development ruff binary
840840
id: ruff-target
841841
with:
@@ -908,7 +908,7 @@ jobs:
908908
run: rustup show
909909

910910
- name: "Install codspeed"
911-
uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2
911+
uses: taiki-e/install-action@86c23eed46c17b80677df6d8151545ce3e236c61 # v2
912912
with:
913913
tool: cargo-codspeed
914914

.github/workflows/mypy_primer.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ jobs:
5050
run: |
5151
cd ruff
5252
53+
echo "Enabling mypy primer specific configuration overloads (see .github/mypy-primer-ty.toml)"
54+
mkdir -p ~/.config/ty
55+
cp .github/mypy-primer-ty.toml ~/.config/ty/ty.toml
56+
5357
PRIMER_SELECTOR="$(paste -s -d'|' crates/ty_python_semantic/resources/primer/good.txt)"
5458
5559
echo "new commit"

.github/workflows/publish-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
ref: ${{ inputs.ref }}
2929
persist-credentials: true
3030

31-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
31+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3232
with:
3333
python-version: 3.12
3434

.github/workflows/publish-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- name: "Install uv"
2525
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
26-
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
26+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
2727
with:
2828
pattern: wheels-*
2929
path: wheels

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
# we specify bash to get pipefail; it guards against the `curl` command
7070
# failing. otherwise `sh` won't catch that `curl` returned non-0
7171
shell: bash
72-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.4/cargo-dist-installer.sh | sh"
72+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.5-prerelease.1/cargo-dist-installer.sh | sh"
7373
- name: Cache dist
7474
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
7575
with:

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exclude: |
55
.github/workflows/release.yml|
66
crates/ty_vendored/vendor/.*|
77
crates/ty_project/resources/.*|
8+
crates/ty/docs/rules.md|
89
crates/ruff_benchmark/resources/.*|
910
crates/ruff_linter/resources/.*|
1011
crates/ruff_linter/src/rules/.*/snapshots/.*|
@@ -65,7 +66,7 @@ repos:
6566
- black==25.1.0
6667

6768
- repo: https://github.com/crate-ci/typos
68-
rev: v1.31.1
69+
rev: v1.32.0
6970
hooks:
7071
- id: typos
7172

@@ -79,7 +80,7 @@ repos:
7980
pass_filenames: false # This makes it a lot faster
8081

8182
- repo: https://github.com/astral-sh/ruff-pre-commit
82-
rev: v0.11.7
83+
rev: v0.11.8
8384
hooks:
8485
- id: ruff-format
8586
- id: ruff

0 commit comments

Comments
 (0)