You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Follow-up release for Ruff v0.10 that now includes the following two
changes that we intended to ship but slipped:
* Changes to how the Python version is inferred when a `target-version`
is not specified (#16319)
* `blanket-noqa` (`PGH004`): Also detect blanked file-level noqa
comments (and not just line level comments).
## Test plan
I verified that the binary built on this branch respects the
`requires-python` setting
([logs](https://www.diffchecker.com/qyJWYi6W/), left: v0.10, right:
v0.11)
Copy file name to clipboardexpand all lines: BREAKING_CHANGES.md
+10-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Breaking Changes
2
2
3
-
## 0.10.0
3
+
## 0.11.0
4
+
5
+
This is a follow-up to release 0.10.0. Because of a mistake in the release process, the `requires-python` inference changes were not included in that release. Ruff 0.11.0 now includes this change as well as the stabilization of the preview behavior for `PGH004`.
4
6
5
7
-**Changes to how the Python version is inferred when a `target-version` is not specified** ([#16319](https://github.com/astral-sh/ruff/pull/16319))
6
8
@@ -23,6 +25,13 @@
23
25
search for the closest `pyproject.toml` in the parent directories and use its
24
26
`requires-python` setting.
25
27
28
+
## 0.10.0
29
+
30
+
-**Changes to how the Python version is inferred when a `target-version` is not specified** ([#16319](https://github.com/astral-sh/ruff/pull/16319))
31
+
32
+
Because of a mistake in the release process, the `requires-python` inference changes are not included in this release and instead shipped as part of 0.11.0.
33
+
You can find a description of this change in the 0.11.0 section.
Previously, Ruff only recognized typechecking blocks that tested the `typing.TYPE_CHECKING` symbol. Now, Ruff recognizes any local variable named `TYPE_CHECKING`. This release also removes support for the legacy `if 0:` and `if False:` typechecking checks. Use a local `TYPE_CHECKING` variable instead.
Copy file name to clipboardexpand all lines: CHANGELOG.md
+25-5
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,11 @@
1
1
# Changelog
2
2
3
-
## 0.10.0
3
+
## 0.11.0
4
4
5
-
Check out the [blog post](https://astral.sh/blog/ruff-v0.10.0) for a migration guide and overview of the changes!
5
+
This is a follow-up to release 0.10.0. Because of a mistake in the release process, the `requires-python` inference changes were not included in that release. Ruff 0.11.0 now includes this change as well as the stabilization of the preview behavior for `PGH004`.
6
6
7
7
### Breaking changes
8
8
9
-
See also, the "Remapped rules" section which may result in disabled rules.
10
-
11
9
-**Changes to how the Python version is inferred when a `target-version` is not specified** ([#16319](https://github.com/astral-sh/ruff/pull/16319))
12
10
13
11
In previous versions of Ruff, you could specify your Python version with:
@@ -29,6 +27,29 @@ See also, the "Remapped rules" section which may result in disabled rules.
29
27
search for the closest `pyproject.toml` in the parent directories and use its
30
28
`requires-python` setting.
31
29
30
+
### Stabilization
31
+
32
+
The following behaviors have been stabilized:
33
+
34
+
-[`blanket-noqa`](https://docs.astral.sh/ruff/rules/blanket-noqa/) (`PGH004`): Also detect blanked file-level noqa comments (and not just line level comments).
35
+
36
+
### Preview features
37
+
38
+
-[syntax-errors] Tuple unpacking in `for` statement iterator clause before Python 3.9 ([#16558](https://github.com/astral-sh/ruff/pull/16558))
39
+
40
+
## 0.10.0
41
+
42
+
Check out the [blog post](https://astral.sh/blog/ruff-v0.10.0) for a migration guide and overview of the changes!
43
+
44
+
### Breaking changes
45
+
46
+
See also, the "Remapped rules" section which may result in disabled rules.
47
+
48
+
-**Changes to how the Python version is inferred when a `target-version` is not specified** ([#16319](https://github.com/astral-sh/ruff/pull/16319))
49
+
50
+
Because of a mistake in the release process, the `requires-python` inference changes are not included in this release and instead shipped as part of 0.11.0.
51
+
You can find a description of this change in the 0.11.0 section.
Previously, Ruff only recognized typechecking blocks that tested the `typing.TYPE_CHECKING` symbol. Now, Ruff recognizes any local variable named `TYPE_CHECKING`. This release also removes support for the legacy `if 0:` and `if False:` typechecking checks. Use a local `TYPE_CHECKING` variable instead.
@@ -86,7 +107,6 @@ The following behaviors have been stabilized:
86
107
87
108
-[`bad-staticmethod-argument`](https://docs.astral.sh/ruff/rules/bad-staticmethod-argument/) (`PLW0211`) [`invalid-first-argument-name-for-class-method`](https://docs.astral.sh/ruff/rules/invalid-first-argument-name-for-class-method/) (`N804`): `__new__` methods are now no longer flagged by `invalid-first-argument-name-for-class-method` (`N804`) but instead by `bad-staticmethod-argument` (`PLW0211`)
88
109
-[`bad-str-strip-call`](https://docs.astral.sh/ruff/rules/bad-str-strip-call/) (`PLE1310`): The rule now applies to objects which are known to have type `str` or `bytes`.
89
-
-[`blanket-noqa`](https://docs.astral.sh/ruff/rules/blanket-noqa/) (`PGH004`): Also detect blanked file-level noqa comments (and not just line level comments).
90
110
-[`custom-type-var-for-self`](https://docs.astral.sh/ruff/rules/custom-type-var-for-self/) (`PYI019`): More accurate detection of custom `TypeVars` replaceable by `Self`. The range of the diagnostic is now the full function header rather than just the return annotation.
91
111
-[`invalid-argument-name`](https://docs.astral.sh/ruff/rules/invalid-argument-name/) (`N803`): Ignore argument names of functions decorated with `typing.override`
92
112
-[`invalid-envvar-default`](https://docs.astral.sh/ruff/rules/invalid-envvar-default/) (`PLW1508`): Detect default value arguments to `os.environ.get` with invalid type.
0 commit comments