Skip to content

Commit e14f60d

Browse files
committed
Merge branch 'main' into dcreager/inferrable
* main: Feature/build riscv64 bin (#19819) [ty] Add caching to `CodeGeneratorKind::matches()` (#19912) [ty] Rename `functionArgumentNames` to `callArgumentNames` inlay hint setting (#19911) [ty] Default `ty.inlayHints.*` server settings to true (#19910) [ty] Remove py-fuzzer skips for seeds that are no longer slow (#19906) [ty] fix deferred name loading in PEP695 generic classes/functions (#19888) [ty] Add some additional type safety to `CycleDetector` (#19903) [`flake8-blind-except`] Fix `BLE001` false-positive on `raise ... from None` (#19755) [ty] resolve docstrings for modules (#19898)
2 parents 3c96bf6 + 9aaa82d commit e14f60d

Some content is hidden

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

47 files changed

+915
-505
lines changed

.github/workflows/build-binaries.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ jobs:
292292
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16
293293
- target: arm-unknown-linux-musleabihf
294294
arch: arm
295+
- target: riscv64gc-unknown-linux-gnu
296+
arch: riscv64
295297

296298
steps:
297299
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -319,7 +321,7 @@ jobs:
319321
githubToken: ${{ github.token }}
320322
install: |
321323
apt-get update
322-
apt-get install -y --no-install-recommends python3 python3-pip
324+
apt-get install -y --no-install-recommends python3 python3-pip libatomic1
323325
pip3 install -U pip
324326
run: |
325327
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall

.github/workflows/ci.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
fuzz: ${{ steps.check_fuzzer.outputs.changed }}
3939
# Flag that is set to "true" when code related to ty changes.
4040
ty: ${{ steps.check_ty.outputs.changed }}
41-
41+
# Flag that is set to "true" when code related to the py-fuzzer folder changes.
42+
py-fuzzer: ${{ steps.check_py_fuzzer.outputs.changed }}
4243
# Flag that is set to "true" when code related to the playground changes.
4344
playground: ${{ steps.check_playground.outputs.changed }}
4445
steps:
@@ -68,7 +69,6 @@ jobs:
6869
':crates/ruff_text_size/**' \
6970
':crates/ruff_python_ast/**' \
7071
':crates/ruff_python_parser/**' \
71-
':python/py-fuzzer/**' \
7272
':.github/workflows/ci.yaml' \
7373
; then
7474
echo "changed=false" >> "$GITHUB_OUTPUT"
@@ -138,6 +138,18 @@ jobs:
138138
echo "changed=true" >> "$GITHUB_OUTPUT"
139139
fi
140140
141+
- name: Check if the py-fuzzer code changed
142+
id: check_py_fuzzer
143+
env:
144+
MERGE_BASE: ${{ steps.merge_base.outputs.sha }}
145+
run: |
146+
if git diff --quiet "${MERGE_BASE}...HEAD" -- 'python/py_fuzzer/**' \
147+
; then
148+
echo "changed=false" >> "$GITHUB_OUTPUT"
149+
else
150+
echo "changed=true" >> "$GITHUB_OUTPUT"
151+
fi
152+
141153
- name: Check if there was any code related change
142154
id: check_code
143155
env:
@@ -443,7 +455,7 @@ jobs:
443455
needs:
444456
- cargo-test-linux
445457
- determine_changes
446-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && needs.determine_changes.outputs.parser == 'true' }}
458+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.parser == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
447459
timeout-minutes: 20
448460
env:
449461
FORCE_COLOR: 1
@@ -633,7 +645,7 @@ jobs:
633645
- cargo-test-linux
634646
- determine_changes
635647
# Only runs on pull requests, since that is the only we way we can find the base version for comparison.
636-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && needs.determine_changes.outputs.ty == 'true' }}
648+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && (needs.determine_changes.outputs.ty == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
637649
timeout-minutes: 20
638650
steps:
639651
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

crates/ruff/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ dist = true
8585
[target.'cfg(target_os = "windows")'.dependencies]
8686
mimalloc = { workspace = true }
8787

88-
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies]
88+
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies]
8989
tikv-jemallocator = { workspace = true }
9090

9191
[lints]

crates/ruff/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
1919
any(
2020
target_arch = "x86_64",
2121
target_arch = "aarch64",
22-
target_arch = "powerpc64"
22+
target_arch = "powerpc64",
23+
target_arch = "riscv64"
2324
)
2425
))]
2526
#[global_allocator]

crates/ruff_benchmark/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ walltime = ["ruff_db/os", "ty_project", "divan"]
8686
[target.'cfg(target_os = "windows")'.dev-dependencies]
8787
mimalloc = { workspace = true }
8888

89-
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dev-dependencies]
89+
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dev-dependencies]
9090
tikv-jemallocator = { workspace = true }

crates/ruff_benchmark/benches/formatter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
2121
any(
2222
target_arch = "x86_64",
2323
target_arch = "aarch64",
24-
target_arch = "powerpc64"
24+
target_arch = "powerpc64",
25+
target_arch = "riscv64"
2526
)
2627
))]
2728
#[global_allocator]

crates/ruff_benchmark/benches/lexer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
1818
any(
1919
target_arch = "x86_64",
2020
target_arch = "aarch64",
21-
target_arch = "powerpc64"
21+
target_arch = "powerpc64",
22+
target_arch = "riscv64"
2223
)
2324
))]
2425
#[global_allocator]

crates/ruff_benchmark/benches/linter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
2626
any(
2727
target_arch = "x86_64",
2828
target_arch = "aarch64",
29-
target_arch = "powerpc64"
29+
target_arch = "powerpc64",
30+
target_arch = "riscv64"
3031
)
3132
))]
3233
#[global_allocator]
@@ -42,7 +43,8 @@ static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
4243
any(
4344
target_arch = "x86_64",
4445
target_arch = "aarch64",
45-
target_arch = "powerpc64"
46+
target_arch = "powerpc64",
47+
target_arch = "riscv64"
4648
)
4749
))]
4850
#[unsafe(export_name = "_rjem_malloc_conf")]

crates/ruff_benchmark/benches/parser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
2020
any(
2121
target_arch = "x86_64",
2222
target_arch = "aarch64",
23-
target_arch = "powerpc64"
23+
target_arch = "powerpc64",
24+
target_arch = "riscv64"
2425
)
2526
))]
2627
#[global_allocator]

crates/ruff_linter/resources/test/fixtures/flake8_blind_except/BLE.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@
154154
except Exception as e:
155155
raise ValueError from e
156156

157+
try:
158+
...
159+
except Exception as e:
160+
raise e from ValueError("hello")
161+
157162

158163
try:
159164
pass
@@ -245,3 +250,9 @@
245250
pass
246251
except (Exception, ValueError) as e:
247252
raise e
253+
254+
# `from None` cause
255+
try:
256+
pass
257+
except BaseException as e:
258+
raise e from None

0 commit comments

Comments
 (0)