Skip to content

Commit 5e6de4e

Browse files
Changelog for Ruff v0.7 (#13794)
Co-authored-by: Dhruv Manilawala <[email protected]>
1 parent 70e5c4a commit 5e6de4e

File tree

9 files changed

+61
-14
lines changed

9 files changed

+61
-14
lines changed

CHANGELOG.md

+47
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# Changelog
22

3+
## 0.7.0
4+
5+
Check out the [blog post](https://astral.sh/blog/ruff-v0.7.0) for a migration guide and overview of the changes!
6+
7+
### Breaking changes
8+
9+
- The pytest rules `PT001` and `PT023` now default to omitting the decorator parentheses when there are no arguments
10+
([#12838](https://github.com/astral-sh/ruff/pull/12838), [#13292](https://github.com/astral-sh/ruff/pull/13292)).
11+
This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part.
12+
See the [blog post](https://astral.sh/blog/ruff-v0.7.0) for more details.
13+
- The `useless-try-except` rule (in our `tryceratops` category) has been recoded from `TRY302` to
14+
`TRY203` ([#13502](https://github.com/astral-sh/ruff/pull/13502)). This ensures Ruff's code is consistent with
15+
the same rule in the [`tryceratops`](https://github.com/guilatrova/tryceratops) linter.
16+
- The `lint.allow-unused-imports` setting has been removed ([#13677](https://github.com/astral-sh/ruff/pull/13677)). Use
17+
[`lint.pyflakes.allow-unused-imports`](https://docs.astral.sh/ruff/settings/#lint_pyflakes_allowed-unused-imports)
18+
instead.
19+
20+
### Formatter preview style
21+
22+
- Normalize implicit concatenated f-string quotes per part ([#13539](https://github.com/astral-sh/ruff/pull/13539))
23+
24+
### Preview linter features
25+
26+
- \[`refurb`\] implement `hardcoded-string-charset` (FURB156) ([#13530](https://github.com/astral-sh/ruff/pull/13530))
27+
- \[`refurb`\] Count codepoints not bytes for `slice-to-remove-prefix-or-suffix (FURB188)` ([#13631](https://github.com/astral-sh/ruff/pull/13631))
28+
29+
### Rule changes
30+
31+
- \[`pylint`\] Mark `PLE1141` fix as unsafe ([#13629](https://github.com/astral-sh/ruff/pull/13629))
32+
- \[`flake8-async`\] Consider async generators to be "checkpoints" for `cancel-scope-no-checkpoint` (`ASYNC100`) ([#13639](https://github.com/astral-sh/ruff/pull/13639))
33+
- \[`flake8-bugbear`\] Do not suggest setting parameter `strict=` to `False` in `B905` diagnostic message ([#13656](https://github.com/astral-sh/ruff/pull/13656))
34+
- \[`flake8-todos`\] Only flag the word "TODO", not words starting with "todo" (`TD006`) ([#13640](https://github.com/astral-sh/ruff/pull/13640))
35+
- \[`pycodestyle`\] Fix whitespace-related false positives and false negatives inside type-parameter lists (`E231`, `E251`) ([#13704](https://github.com/astral-sh/ruff/pull/13704))
36+
- \[`flake8-simplify`\] Stabilize preview behavior for `SIM115` so that the rule can detect files
37+
being opened from a wider range of standard-library functions ([#12959](https://github.com/astral-sh/ruff/pull/12959)).
38+
39+
### CLI
40+
41+
- Add explanation of fixable in `--statistics` command ([#13774](https://github.com/astral-sh/ruff/pull/13774))
42+
43+
### Bug fixes
44+
45+
- \[`pyflakes`\] Allow `ipytest` cell magic (`F401`) ([#13745](https://github.com/astral-sh/ruff/pull/13745))
46+
- \[`flake8-use-pathlib`\] Fix `PTH123` false positive when `open` is passed a file descriptor ([#13616](https://github.com/astral-sh/ruff/pull/13616))
47+
- \[`flake8-bandit`\] Detect patterns from multi line SQL statements (`S608`) ([#13574](https://github.com/astral-sh/ruff/pull/13574))
48+
- \[`flake8-pyi`\] - Fix dropped expressions in `PYI030` autofix ([#13727](https://github.com/astral-sh/ruff/pull/13727))
49+
350
## 0.6.9
451

552
### Preview features

Cargo.lock

+3-3
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.6.9/install.sh | sh
140-
powershell -c "irm https://astral.sh/ruff/0.6.9/install.ps1 | iex"
139+
curl -LsSf https://astral.sh/ruff/0.7.0/install.sh | sh
140+
powershell -c "irm https://astral.sh/ruff/0.7.0/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.6.9
173+
rev: v0.7.0
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.6.9"
3+
version = "0.7.0"
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.6.9"
3+
version = "0.7.0"
44
publish = false
55
authors = { workspace = true }
66
edition = { workspace = true }

crates/ruff_wasm/Cargo.toml

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

docs/integrations.md

+3-3
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.6.9
81+
rev: v0.7.0
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.6.9
94+
rev: v0.7.0
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.6.9
108+
rev: v0.7.0
109109
hooks:
110110
# Run the linter.
111111
- 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.6.9"
7+
version = "0.7.0"
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.6.9"
3+
version = "0.7.0"
44
description = ""
55
authors = ["Charles Marsh <[email protected]>"]
66

0 commit comments

Comments
 (0)