Skip to content

Commit 3bd98a5

Browse files
committed
Merge branch 'main' into charlie/metaclass
* main: (40 commits) [ty] resolve union-likes in emitting union attribute errors (#24263) [ty] Improve support for `Callable` type context (#23888) [ty] Propagate type context through `await` expressions (#24256) [`pyflakes`] Flag annotated variable redeclarations as `F811` in preview mode (#24244) [ty] Preserve `Divergent` when materializing recursive aliases (#24245) Fix W391 fixes for consecutive empty notebook cells (#24236) [flake8-bugbear] Clarify RUF071 fix safety for non-path string comparisons (#24149) [ty] Ban type qualifiers in PEP-695 type aliases (#24242) [ty] Include keyword-prefixed symbols in completions for attributes (#24232) [ty] Add tests for TypedDict method overloads on unions (#24230) [ty] report unused bindings as unnecessary hint diagnostics (#23305) Remove unused `non_root` variable (#24238) Extend F507 to flag %-format strings with zero placeholders (#24215) [`flake8-simplify`] Suppress `SIM105` for `except*` before Python 3.12 (#23869) Ignore pre-initialization references in SIM113 (#24235) Parenthesize expression in RUF050 fix (#24234) Publish playgrounds using the `release-playground` environment (#24223) [ty] Fix instance-attribute lookup in methods of protocol classes (#24213) [ty] Used shared expression cache during generic call inference (#24219) [ty] make `Type::BoundMethod` include instances of same-named methods bound to a subclass (#24039) ...
2 parents 37968a3 + 62e1a60 commit 3bd98a5

119 files changed

Lines changed: 4681 additions & 1003 deletions

File tree

Some content is hidden

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Thank you for contributing to Ruff/ty! To help us out with reviewing, please con
55
- Does this pull request include a descriptive title? (Please prefix with `[ty]` for ty pull
66
requests.)
77
- Does this pull request include references to any relevant issues?
8+
- Does this PR follow our AI policy (https://github.com/astral-sh/.github/blob/main/AI_POLICY.md)?
89
-->
910

1011
## Summary

.github/workflows/publish-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ permissions:
2222

2323
jobs:
2424
mkdocs:
25+
environment:
26+
name: release
2527
runs-on: ubuntu-latest
2628
steps:
2729
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/publish-playground.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ permissions: {}
2323
jobs:
2424
publish:
2525
runs-on: ubuntu-latest
26+
environment: release-playground
2627
env:
2728
CF_API_TOKEN_EXISTS: ${{ secrets.CF_API_TOKEN != '' }}
2829
steps:

.github/workflows/publish-ty-playground.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
jobs:
2828
publish:
2929
runs-on: ubuntu-latest
30+
environment: release-playground
3031
env:
3132
CF_API_TOKEN_EXISTS: ${{ secrets.CF_API_TOKEN != '' }}
3233
steps:

.github/workflows/publish-versions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ permissions: {}
1616
jobs:
1717
publish-versions:
1818
runs-on: ubuntu-latest
19+
environment: release
1920
env:
2021
VERSION: ${{ fromJson(inputs.plan).announcement_tag }}
2122
steps:

.github/workflows/publish-wasm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
jobs:
1515
publish:
1616
runs-on: ubuntu-latest
17+
environment: release
1718
permissions:
1819
contents: read
1920
id-token: write

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,67 @@
11
# Changelog
22

3+
## 0.15.8
4+
5+
Released on 2026-03-26.
6+
7+
### Preview features
8+
9+
- \[`ruff`\] New rule `unnecessary-if` (`RUF050`) ([#24114](https://github.com/astral-sh/ruff/pull/24114))
10+
- \[`ruff`\] New rule `useless-finally` (`RUF072`) ([#24165](https://github.com/astral-sh/ruff/pull/24165))
11+
- \[`ruff`\] New rule `f-string-percent-format` (`RUF073`): warn when using `%` operator on an f-string ([#24162](https://github.com/astral-sh/ruff/pull/24162))
12+
- \[`pyflakes`\] Recognize `frozendict` as a builtin for Python 3.15+ ([#24100](https://github.com/astral-sh/ruff/pull/24100))
13+
14+
### Bug fixes
15+
16+
- \[`flake8-async`\] Use fully-qualified `anyio.lowlevel` import in autofix (`ASYNC115`) ([#24166](https://github.com/astral-sh/ruff/pull/24166))
17+
- \[`flake8-bandit`\] Check tuple arguments for partial paths in `S607` ([#24080](https://github.com/astral-sh/ruff/pull/24080))
18+
- \[`pyflakes`\] Skip `undefined-name` (`F821`) for conditionally deleted variables ([#24088](https://github.com/astral-sh/ruff/pull/24088))
19+
- `E501`/`W505`/formatter: Exclude nested pragma comments from line width calculation ([#24071](https://github.com/astral-sh/ruff/pull/24071))
20+
- Fix `%foo?` parsing in IPython assignment expressions ([#24152](https://github.com/astral-sh/ruff/pull/24152))
21+
- `analyze graph`: resolve string imports that reference attributes, not just modules ([#24058](https://github.com/astral-sh/ruff/pull/24058))
22+
23+
### Rule changes
24+
25+
- \[`eradicate`\] ignore `ty: ignore` comments in `ERA001` ([#24192](https://github.com/astral-sh/ruff/pull/24192))
26+
- \[`flake8-bandit`\] Treat `sys.executable` as trusted input in `S603` ([#24106](https://github.com/astral-sh/ruff/pull/24106))
27+
- \[`flake8-self`\] Recognize `Self` annotation and `self` assignment in `SLF001` ([#24144](https://github.com/astral-sh/ruff/pull/24144))
28+
- \[`pyflakes`\] `F507`: Fix false negative for non-tuple RHS in `%`-formatting ([#24142](https://github.com/astral-sh/ruff/pull/24142))
29+
- \[`refurb`\] Parenthesize generator arguments in `FURB142` fixer ([#24200](https://github.com/astral-sh/ruff/pull/24200))
30+
31+
### Performance
32+
33+
- Speed up diagnostic rendering ([#24146](https://github.com/astral-sh/ruff/pull/24146))
34+
35+
### Server
36+
37+
- Warn when Markdown files are skipped due to preview being disabled ([#24150](https://github.com/astral-sh/ruff/pull/24150))
38+
39+
### Documentation
40+
41+
- Clarify `extend-ignore` and `extend-select` settings documentation ([#24064](https://github.com/astral-sh/ruff/pull/24064))
42+
- Mention AI policy in PR template ([#24198](https://github.com/astral-sh/ruff/pull/24198))
43+
44+
### Other changes
45+
46+
- Use trusted publishing for NPM packages ([#24171](https://github.com/astral-sh/ruff/pull/24171))
47+
48+
### Contributors
49+
50+
- [@bitloi](https://github.com/bitloi)
51+
- [@Sim-hu](https://github.com/Sim-hu)
52+
- [@mvanhorn](https://github.com/mvanhorn)
53+
- [@chinar-amrutkar](https://github.com/chinar-amrutkar)
54+
- [@markjm](https://github.com/markjm)
55+
- [@RenzoMXD](https://github.com/RenzoMXD)
56+
- [@vivekkhimani](https://github.com/vivekkhimani)
57+
- [@seroperson](https://github.com/seroperson)
58+
- [@moktamd](https://github.com/moktamd)
59+
- [@charliermarsh](https://github.com/charliermarsh)
60+
- [@ntBre](https://github.com/ntBre)
61+
- [@zanieb](https://github.com/zanieb)
62+
- [@dylwil3](https://github.com/dylwil3)
63+
- [@MichaReiser](https://github.com/MichaReiser)
64+
365
## 0.15.7
466

567
Released on 2026-03-19.

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ curl -LsSf https://astral.sh/ruff/install.sh | sh
152152
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
153153

154154
# For a specific version.
155-
curl -LsSf https://astral.sh/ruff/0.15.7/install.sh | sh
156-
powershell -c "irm https://astral.sh/ruff/0.15.7/install.ps1 | iex"
155+
curl -LsSf https://astral.sh/ruff/0.15.8/install.sh | sh
156+
powershell -c "irm https://astral.sh/ruff/0.15.8/install.ps1 | iex"
157157
```
158158

159159
You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),
@@ -186,7 +186,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff
186186
```yaml
187187
- repo: https://github.com/astral-sh/ruff-pre-commit
188188
# Ruff version.
189-
rev: v0.15.7
189+
rev: v0.15.8
190190
hooks:
191191
# Run the linter.
192192
- id: ruff-check

crates/ruff/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ruff"
3-
version = "0.15.7"
3+
version = "0.15.8"
44
publish = true
55
authors = { workspace = true }
66
edition = { workspace = true }

0 commit comments

Comments
 (0)