Skip to content

Commit da824ba

Browse files
Release Ruff 0.5.6 (#12629)
Co-authored-by: Alex Waygood <[email protected]>
1 parent 012198a commit da824ba

File tree

9 files changed

+64
-14
lines changed

9 files changed

+64
-14
lines changed

CHANGELOG.md

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

3+
## 0.5.6
4+
5+
Ruff 0.5.6 automatically enables linting and formatting of notebooks in *preview mode*.
6+
You can opt-out of this behavior by adding `*.ipynb` to the `extend-exclude` setting.
7+
8+
```toml
9+
[tool.ruff]
10+
extend-exclude = ["*.ipynb"]
11+
```
12+
13+
### Preview features
14+
15+
- Enable notebooks by default in preview mode ([#12621](https://github.com/astral-sh/ruff/pull/12621))
16+
- \[`flake8-builtins`\] Implement import, lambda, and module shadowing ([#12546](https://github.com/astral-sh/ruff/pull/12546))
17+
- \[`pydoclint`\] Add `docstring-missing-returns` (`DOC201`) and `docstring-extraneous-returns` (`DOC202`) ([#12485](https://github.com/astral-sh/ruff/pull/12485))
18+
19+
### Rule changes
20+
21+
- \[`flake8-return`\] Exempt cached properties and other property-like decorators from explicit return rule (`RET501`) ([#12563](https://github.com/astral-sh/ruff/pull/12563))
22+
23+
### Server
24+
25+
- Make server panic hook more error resilient ([#12610](https://github.com/astral-sh/ruff/pull/12610))
26+
- Use `$/logTrace` for server trace logs in Zed and VS Code ([#12564](https://github.com/astral-sh/ruff/pull/12564))
27+
- Keep track of deleted cells for reorder change request ([#12575](https://github.com/astral-sh/ruff/pull/12575))
28+
29+
### Configuration
30+
31+
- \[`flake8-implicit-str-concat`\] Always allow explicit multi-line concatenations when implicit concatenations are banned ([#12532](https://github.com/astral-sh/ruff/pull/12532))
32+
33+
### Bug fixes
34+
35+
- \[`flake8-async`\] Avoid flagging `asyncio.timeout`s as unused when the context manager includes `asyncio.TaskGroup` ([#12605](https://github.com/astral-sh/ruff/pull/12605))
36+
- \[`flake8-slots`\] Avoid recommending `__slots__` for classes that inherit from more than `namedtuple` ([#12531](https://github.com/astral-sh/ruff/pull/12531))
37+
- \[`isort`\] Avoid marking required imports as unused ([#12537](https://github.com/astral-sh/ruff/pull/12537))
38+
- \[`isort`\] Preserve trailing inline comments on import-from statements ([#12498](https://github.com/astral-sh/ruff/pull/12498))
39+
- \[`pycodestyle`\] Add newlines before comments (`E305`) ([#12606](https://github.com/astral-sh/ruff/pull/12606))
40+
- \[`pycodestyle`\] Don't attach comments with mismatched indents ([#12604](https://github.com/astral-sh/ruff/pull/12604))
41+
- \[`pyflakes`\] Fix preview-mode bugs in `F401` when attempting to autofix unused first-party submodule imports in an `__init__.py` file ([#12569](https://github.com/astral-sh/ruff/pull/12569))
42+
- \[`pylint`\] Respect start index in `unnecessary-list-index-lookup` ([#12603](https://github.com/astral-sh/ruff/pull/12603))
43+
- \[`pyupgrade`\] Avoid recommending no-argument super in `slots=True` dataclasses ([#12530](https://github.com/astral-sh/ruff/pull/12530))
44+
- \[`pyupgrade`\] Use colon rather than dot formatting for integer-only types ([#12534](https://github.com/astral-sh/ruff/pull/12534))
45+
- Fix NFKC normalization bug when removing unused imports ([#12571](https://github.com/astral-sh/ruff/pull/12571))
46+
47+
### Other changes
48+
49+
- Consider more stdlib decorators to be property-like ([#12583](https://github.com/astral-sh/ruff/pull/12583))
50+
- Improve handling of metaclasses in various linter rules ([#12579](https://github.com/astral-sh/ruff/pull/12579))
51+
- Improve consistency between linter rules in determining whether a function is property ([#12581](https://github.com/astral-sh/ruff/pull/12581))
52+
353
## 0.5.5
454

555
### Preview features

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
@@ -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.5/install.sh | sh
140-
powershell -c "irm https://astral.sh/ruff/0.5.5/install.ps1 | iex"
139+
curl -LsSf https://astral.sh/ruff/0.5.6/install.sh | sh
140+
powershell -c "irm https://astral.sh/ruff/0.5.6/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.5
173+
rev: v0.5.6
174174
hooks:
175175
# Run the linter.
176176
- id: ruff

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.5.5"
3+
version = "0.5.6"
44
publish = true
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_linter/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_linter"
3-
version = "0.5.5"
3+
version = "0.5.6"
44
publish = false
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_wasm/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_wasm"
3-
version = "0.5.5"
3+
version = "0.5.6"
44
publish = false
55
authors = { workspace = true }
66
edition = { workspace = true }

docs/integrations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Ruff can be used as a [pre-commit](https://pre-commit.com) hook via [`ruff-pre-c
7878
```yaml
7979
- repo: https://github.com/astral-sh/ruff-pre-commit
8080
# Ruff version.
81-
rev: v0.5.5
81+
rev: v0.5.6
8282
hooks:
8383
# Run the linter.
8484
- id: ruff
@@ -91,7 +91,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
9191
```yaml
9292
- repo: https://github.com/astral-sh/ruff-pre-commit
9393
# Ruff version.
94-
rev: v0.5.5
94+
rev: v0.5.6
9595
hooks:
9696
# Run the linter.
9797
- id: ruff
@@ -105,7 +105,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe
105105
```yaml
106106
- repo: https://github.com/astral-sh/ruff-pre-commit
107107
# Ruff version.
108-
rev: v0.5.5
108+
rev: v0.5.6
109109
hooks:
110110
# Run the linter.
111111
- id: ruff

pyproject.toml

Lines changed: 1 addition & 1 deletion
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.5"
7+
version = "0.5.6"
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "scripts"
3-
version = "0.5.5"
3+
version = "0.5.6"
44
description = ""
55
authors = ["Charles Marsh <[email protected]>"]
66

0 commit comments

Comments
 (0)