Skip to content

Commit b8ffa78

Browse files
committed
Merge branch 'main' into alex/eager-scopes
* main: (991 commits) [red-knot] Resolve `Options` to `Settings` (#16000) Bump version to 0.9.6 (#16074) Revert tailwindcss v4 update (#16075) Improve migration document (#16072) Fix reference definition labels for backtick-quoted shortcut links (#16035) RUF009 should behave similar to B008 and ignore attributes with immutable types (#16048) [`pylint`] Also report when the object isn't a literal (`PLE1310`) (#15985) Update Rust crate rustc-hash to v2.1.1 (#16060) Root exclusions in the server to project root (#16043) Directly include `Settings` struct for the server (#16042) Update Rust crate clap to v4.5.28 (#16059) Update Rust crate strum_macros to 0.27.0 (#16065) Update NPM Development dependencies (#16067) Update Rust crate uuid to v1.13.1 (#16066) Update Rust crate strum to 0.27.0 (#16064) Update pre-commit dependencies (#16063) Update dependency ruff to v0.9.5 (#16062) Update Rust crate toml to v0.8.20 (#16061) [`flake8-builtins`] Make strict module name comparison optional (`A005`) (#15951) [`ruff`] Indented form feeds (`RUF054`) (#16049) ...
2 parents f4904b1 + 678b0c2 commit b8ffa78

File tree

3,708 files changed

+159094
-60337
lines changed

Some content is hidden

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

3,708 files changed

+159094
-60337
lines changed

.cargo/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ benchmark = "bench -p ruff_benchmark --bench linter --bench formatter --"
88
# See: https://github.com/astral-sh/ruff/issues/11503
99
[target.'cfg(all(target_env="msvc", target_os = "windows"))']
1010
rustflags = ["-C", "target-feature=+crt-static"]
11+
12+
[target.'wasm32-unknown-unknown']
13+
# See https://docs.rs/getrandom/latest/getrandom/#webassembly-support
14+
rustflags = ["--cfg", 'getrandom_backend="wasm_js"']

.config/nextest.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ failure-output = "immediate-final"
66
fail-fast = false
77

88
status-level = "skip"
9+
10+
# Mark tests that take longer than 1s as slow.
11+
# Terminate after 60s as a stop-gap measure to terminate on deadlock.
12+
slow-timeout = { period = "1s", terminate-after = 60 }
13+
14+
# Show slow jobs in the final summary
15+
final-status-level = "slow"

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ crates/ruff_python_parser/resources/invalid/re_lex_logical_token_mac_eol.py text
1414

1515
crates/ruff_python_parser/resources/inline linguist-generated=true
1616

17-
ruff.schema.json linguist-generated=true text=auto eol=lf
17+
ruff.schema.json -diff linguist-generated=true text=auto eol=lf
18+
crates/ruff_python_ast/src/generated.rs -diff linguist-generated=true text=auto eol=lf
19+
crates/ruff_python_formatter/src/generated.rs -diff linguist-generated=true text=auto eol=lf
1820
*.md.snap linguist-language=Markdown

.github/CODEOWNERS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
/crates/ruff_formatter/ @MichaReiser
1010
/crates/ruff_python_formatter/ @MichaReiser
1111
/crates/ruff_python_parser/ @MichaReiser @dhruvmanila
12+
/crates/ruff_annotate_snippets/ @BurntSushi
1213

1314
# flake8-pyi
1415
/crates/ruff_linter/src/rules/flake8_pyi/ @AlexWaygood
1516

16-
# Script for fuzzing the parser
17-
/scripts/fuzz-parser/ @AlexWaygood
17+
# Script for fuzzing the parser/red-knot etc.
18+
/python/py-fuzzer/ @AlexWaygood
1819

1920
# red-knot
2021
/crates/red_knot* @carljm @MichaReiser @AlexWaygood @sharkdp
2122
/crates/ruff_db/ @carljm @MichaReiser @AlexWaygood @sharkdp
23+
/scripts/knot_benchmark/ @carljm @MichaReiser @AlexWaygood @sharkdp

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file cannot use the extension `.yaml`.
2+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/issue.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: New issue
2+
description: A generic issue
3+
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for taking the time to report an issue! We're glad to have you involved with Ruff.
9+
10+
If you're filing a bug report, please consider including the following information:
11+
12+
* List of keywords you searched for before creating this issue. Write them down here so that others can find this issue more easily and help provide feedback.
13+
e.g. "RUF001", "unused variable", "Jupyter notebook"
14+
* A minimal code snippet that reproduces the bug.
15+
* The command you invoked (e.g., `ruff /path/to/file.py --fix`), ideally including the `--isolated` flag.
16+
* The current Ruff settings (any relevant sections from your `pyproject.toml`).
17+
* The current Ruff version (`ruff --version`).
18+
19+
- type: textarea
20+
attributes:
21+
label: Description
22+
description: A description of the issue

.github/actionlint.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Configuration for the actionlint tool, which we run via pre-commit
2+
# to verify the correctness of the syntax in our GitHub Actions workflows.
3+
4+
self-hosted-runner:
5+
# Various runners we use that aren't recognized out-of-the-box by actionlint:
6+
labels:
7+
- depot-ubuntu-latest-8
8+
- depot-ubuntu-22.04-16
9+
- github-windows-2025-x86_64-8
10+
- github-windows-2025-x86_64-16

.github/renovate.json5

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
groupName: "Artifact GitHub Actions dependencies",
4646
matchManagers: ["github-actions"],
4747
matchDatasources: ["gitea-tags", "github-tags"],
48-
matchPackagePatterns: ["actions/.*-artifact"],
48+
matchPackageNames: ["actions/.*-artifact"],
4949
description: "Weekly update of artifact-related GitHub Actions dependencies",
5050
},
5151
{
@@ -58,10 +58,16 @@
5858
description: "Disable PRs updating GitHub runners (e.g. 'runs-on: macos-14')",
5959
enabled: false,
6060
},
61+
{
62+
// TODO: Remove this once the codebase is upgrade to v4 (https://github.com/astral-sh/ruff/pull/16069)
63+
matchPackageNames: ["tailwindcss"],
64+
matchManagers: ["npm"],
65+
enabled: false,
66+
},
6167
{
6268
// Disable updates of `zip-rs`; intentionally pinned for now due to ownership change
6369
// See: https://github.com/astral-sh/uv/issues/3642
64-
matchPackagePatterns: ["zip"],
70+
matchPackageNames: ["zip"],
6571
matchManagers: ["cargo"],
6672
enabled: false,
6773
},
@@ -70,7 +76,7 @@
7076
// with `mkdocs-material-insider`.
7177
// See: https://squidfunk.github.io/mkdocs-material/insiders/upgrade/
7278
matchManagers: ["pip_requirements"],
73-
matchPackagePatterns: ["mkdocs-material"],
79+
matchPackageNames: ["mkdocs-material"],
7480
enabled: false,
7581
},
7682
{
@@ -87,13 +93,13 @@
8793
{
8894
groupName: "Monaco",
8995
matchManagers: ["npm"],
90-
matchPackagePatterns: ["monaco"],
96+
matchPackageNames: ["monaco"],
9197
description: "Weekly update of the Monaco editor",
9298
},
9399
{
94100
groupName: "strum",
95101
matchManagers: ["cargo"],
96-
matchPackagePatterns: ["strum"],
102+
matchPackageNames: ["strum"],
97103
description: "Weekly update of strum dependencies",
98104
},
99105
{

.github/workflows/build-binaries.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ concurrency:
2323
group: ${{ github.workflow }}-${{ github.ref }}
2424
cancel-in-progress: true
2525

26+
permissions: {}
27+
2628
env:
2729
PACKAGE_NAME: ruff
2830
MODULE_NAME: ruff
@@ -40,6 +42,7 @@ jobs:
4042
- uses: actions/checkout@v4
4143
with:
4244
submodules: recursive
45+
persist-credentials: false
4346
- uses: actions/setup-python@v5
4447
with:
4548
python-version: ${{ env.PYTHON_VERSION }}
@@ -52,9 +55,9 @@ jobs:
5255
args: --out dist
5356
- name: "Test sdist"
5457
run: |
55-
pip install dist/${{ env.PACKAGE_NAME }}-*.tar.gz --force-reinstall
56-
${{ env.MODULE_NAME }} --help
57-
python -m ${{ env.MODULE_NAME }} --help
58+
pip install dist/"${PACKAGE_NAME}"-*.tar.gz --force-reinstall
59+
"${MODULE_NAME}" --help
60+
python -m "${MODULE_NAME}" --help
5861
- name: "Upload sdist"
5962
uses: actions/upload-artifact@v4
6063
with:
@@ -68,6 +71,7 @@ jobs:
6871
- uses: actions/checkout@v4
6972
with:
7073
submodules: recursive
74+
persist-credentials: false
7175
- uses: actions/setup-python@v5
7276
with:
7377
python-version: ${{ env.PYTHON_VERSION }}
@@ -109,6 +113,7 @@ jobs:
109113
- uses: actions/checkout@v4
110114
with:
111115
submodules: recursive
116+
persist-credentials: false
112117
- uses: actions/setup-python@v5
113118
with:
114119
python-version: ${{ env.PYTHON_VERSION }}
@@ -122,7 +127,7 @@ jobs:
122127
args: --release --locked --out dist
123128
- name: "Test wheel - aarch64"
124129
run: |
125-
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
130+
pip install dist/"${PACKAGE_NAME}"-*.whl --force-reinstall
126131
ruff --help
127132
python -m ruff --help
128133
- name: "Upload wheels"
@@ -164,6 +169,7 @@ jobs:
164169
- uses: actions/checkout@v4
165170
with:
166171
submodules: recursive
172+
persist-credentials: false
167173
- uses: actions/setup-python@v5
168174
with:
169175
python-version: ${{ env.PYTHON_VERSION }}
@@ -182,9 +188,9 @@ jobs:
182188
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
183189
shell: bash
184190
run: |
185-
python -m pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
186-
${{ env.MODULE_NAME }} --help
187-
python -m ${{ env.MODULE_NAME }} --help
191+
python -m pip install dist/"${PACKAGE_NAME}"-*.whl --force-reinstall
192+
"${MODULE_NAME}" --help
193+
python -m "${MODULE_NAME}" --help
188194
- name: "Upload wheels"
189195
uses: actions/upload-artifact@v4
190196
with:
@@ -216,6 +222,7 @@ jobs:
216222
- uses: actions/checkout@v4
217223
with:
218224
submodules: recursive
225+
persist-credentials: false
219226
- uses: actions/setup-python@v5
220227
with:
221228
python-version: ${{ env.PYTHON_VERSION }}
@@ -231,9 +238,9 @@ jobs:
231238
- name: "Test wheel"
232239
if: ${{ startsWith(matrix.target, 'x86_64') }}
233240
run: |
234-
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
235-
${{ env.MODULE_NAME }} --help
236-
python -m ${{ env.MODULE_NAME }} --help
241+
pip install dist/"${PACKAGE_NAME}"-*.whl --force-reinstall
242+
"${MODULE_NAME}" --help
243+
python -m "${MODULE_NAME}" --help
237244
- name: "Upload wheels"
238245
uses: actions/upload-artifact@v4
239246
with:
@@ -290,6 +297,7 @@ jobs:
290297
- uses: actions/checkout@v4
291298
with:
292299
submodules: recursive
300+
persist-credentials: false
293301
- uses: actions/setup-python@v5
294302
with:
295303
python-version: ${{ env.PYTHON_VERSION }}
@@ -354,6 +362,7 @@ jobs:
354362
- uses: actions/checkout@v4
355363
with:
356364
submodules: recursive
365+
persist-credentials: false
357366
- uses: actions/setup-python@v5
358367
with:
359368
python-version: ${{ env.PYTHON_VERSION }}
@@ -419,6 +428,7 @@ jobs:
419428
- uses: actions/checkout@v4
420429
with:
421430
submodules: recursive
431+
persist-credentials: false
422432
- uses: actions/setup-python@v5
423433
with:
424434
python-version: ${{ env.PYTHON_VERSION }}

0 commit comments

Comments
 (0)