Skip to content

Commit 1b3bff0

Browse files
authored
Bump version to 0.5.1 (#12205)
1 parent 0f6f73e commit 1b3bff0

File tree

9 files changed

+52
-12
lines changed

9 files changed

+52
-12
lines changed

CHANGELOG.md

+36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changelog
22

3+
## 0.5.1
4+
5+
### Preview features
6+
7+
- \[`flake8-bugbear`\] Implement mutable-contextvar-default (B039) ([#12113](https://github.com/astral-sh/ruff/pull/12113))
8+
- \[`pycodestyle`\] Whitespace after decorator (`E204`) ([#12140](https://github.com/astral-sh/ruff/pull/12140))
9+
- \[`pytest`\] Reverse `PT001` and `PT0023` defaults ([#12106](https://github.com/astral-sh/ruff/pull/12106))
10+
11+
### Rule changes
12+
13+
- Enable token-based rules on source with syntax errors ([#11950](https://github.com/astral-sh/ruff/pull/11950))
14+
- \[`flake8-bandit`\] Detect `httpx` for `S113` ([#12174](https://github.com/astral-sh/ruff/pull/12174))
15+
- \[`numpy`\] Update `NPY201` to include exception deprecations ([#12065](https://github.com/astral-sh/ruff/pull/12065))
16+
- \[`pylint`\] Generate autofix for `duplicate-bases` (`PLE0241`) ([#12105](https://github.com/astral-sh/ruff/pull/12105))
17+
18+
### Server
19+
20+
- Avoid syntax error notification for source code actions ([#12148](https://github.com/astral-sh/ruff/pull/12148))
21+
- Consider the content of the new cells during notebook sync ([#12203](https://github.com/astral-sh/ruff/pull/12203))
22+
- Fix replacement edit range computation ([#12171](https://github.com/astral-sh/ruff/pull/12171))
23+
24+
### Bug fixes
25+
26+
- Disable auto-fix when source has syntax errors ([#12134](https://github.com/astral-sh/ruff/pull/12134))
27+
- Fix cache key collisions for paths with separators ([#12159](https://github.com/astral-sh/ruff/pull/12159))
28+
- Make `requires-python` inference robust to `==` ([#12091](https://github.com/astral-sh/ruff/pull/12091))
29+
- Use char-wise width instead of `str`-width ([#12135](https://github.com/astral-sh/ruff/pull/12135))
30+
- \[`pycodestyle`\] Avoid `E275` if keyword followed by comma ([#12136](https://github.com/astral-sh/ruff/pull/12136))
31+
- \[`pycodestyle`\] Avoid `E275` if keyword is followed by a semicolon ([#12095](https://github.com/astral-sh/ruff/pull/12095))
32+
- \[`pylint`\] Skip [dummy variables](https://docs.astral.sh/ruff/settings/#lint_dummy-variable-rgx) for `PLR1704` ([#12190](https://github.com/astral-sh/ruff/pull/12190))
33+
34+
### Performance
35+
36+
- Remove allocation in `parse_identifier` ([#12103](https://github.com/astral-sh/ruff/pull/12103))
37+
- Use `CompactString` for `Identifier` AST node ([#12101](https://github.com/astral-sh/ruff/pull/12101))
38+
339
## 0.5.0
440

541
Check out the [blog post](https://astral.sh/blog/ruff-v0.5.0) for a migration guide and overview of the changes!

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ curl -LsSf https://astral.sh/ruff/install.sh | sh
136136
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
137137

138138
# For a specific version.
139-
curl -LsSf https://astral.sh/ruff/0.5.0/install.sh | sh
140-
powershell -c "irm https://astral.sh/ruff/0.5.0/install.ps1 | iex"
139+
curl -LsSf https://astral.sh/ruff/0.5.1/install.sh | sh
140+
powershell -c "irm https://astral.sh/ruff/0.5.1/install.ps1 | iex"
141141
```
142142

143143
You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),
@@ -170,7 +170,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff
170170
```yaml
171171
- repo: https://github.com/astral-sh/ruff-pre-commit
172172
# Ruff version.
173-
rev: v0.5.0
173+
rev: v0.5.1
174174
hooks:
175175
# Run the linter.
176176
- id: ruff

crates/ruff/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ruff"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
publish = true
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_linter/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ruff_linter"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
publish = false
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_linter/src/rules/pylint/rules/redefined_argument_from_local.rs

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ use ruff_macros::{derive_message_formats, violation};
2222
/// for inner_host_id, host in [[12.13, "Venus"], [14.15, "Mars"]]:
2323
/// print(host_id, inner_host_id, host)
2424
/// ```
25+
///
26+
/// ## Options
27+
/// - `lint.dummy-variable-rgx`
28+
///
2529
/// ## References
2630
/// - [Pylint documentation](https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/redefined-argument-from-local.html)
2731

docs/integrations.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Ruff can be used as a [pre-commit](https://pre-commit.com) hook via [`ruff-pre-c
1414
```yaml
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
1616
# Ruff version.
17-
rev: v0.5.0
17+
rev: v0.5.1
1818
hooks:
1919
# Run the linter.
2020
- id: ruff
@@ -27,7 +27,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
2727
```yaml
2828
- repo: https://github.com/astral-sh/ruff-pre-commit
2929
# Ruff version.
30-
rev: v0.5.0
30+
rev: v0.5.1
3131
hooks:
3232
# Run the linter.
3333
- id: ruff
@@ -41,7 +41,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe
4141
```yaml
4242
- repo: https://github.com/astral-sh/ruff-pre-commit
4343
# Ruff version.
44-
rev: v0.5.0
44+
rev: v0.5.1
4545
hooks:
4646
# Run the linter.
4747
- id: ruff

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "ruff"
7-
version = "0.5.0"
7+
version = "0.5.1"
88
description = "An extremely fast Python linter and code formatter, written in Rust."
99
authors = [{ name = "Astral Software Inc.", email = "[email protected]" }]
1010
readme = "README.md"

scripts/benchmarks/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "scripts"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
description = ""
55
authors = ["Charles Marsh <[email protected]>"]
66

0 commit comments

Comments
 (0)