|
1 | 1 | # Breaking Changes |
2 | 2 |
|
| 3 | +## 0.13.0 |
| 4 | + |
| 5 | +- **Several rules can now add `from __future__ import annotations` automatically** |
| 6 | + |
| 7 | + `TC001`, `TC002`, `TC003`, `RUF013`, and `UP037` now add `from __future__ import annotations` as part of their fixes when the |
| 8 | + `lint.future-annotations` setting is enabled. This allows the rules to move |
| 9 | + more imports into `TYPE_CHECKING` blocks (`TC001`, `TC002`, and `TC003`), |
| 10 | + use PEP 604 union syntax on Python versions before 3.10 (`RUF013`), and |
| 11 | + unquote more annotations (`UP037`). |
| 12 | + |
| 13 | +- **Full module paths are now used to verify first-party modules** |
| 14 | + |
| 15 | + Ruff now checks that the full path to a module exists on disk before |
| 16 | + categorizing it as a first-party import. This change makes first-party |
| 17 | + import detection more accurate, helping to avoid false positives on local |
| 18 | + directories with the same name as a third-party dependency, for example. See |
| 19 | + the [FAQ |
| 20 | + section](https://docs.astral.sh/ruff/faq/#how-does-ruff-determine-which-of-my-imports-are-first-party-third-party-etc) on import categorization for more details. |
| 21 | + |
| 22 | +- **Deprecated rules must now be selected by exact rule code** |
| 23 | + |
| 24 | + Ruff will no longer activate deprecated rules selected by their group name |
| 25 | + or prefix. As noted below, the two remaining deprecated rules were also |
| 26 | + removed in this release, so this won't affect any current rules, but it will |
| 27 | + still affect any deprecations in the future. |
| 28 | + |
| 29 | +- **The deprecated macOS configuration directory fallback has been removed** |
| 30 | + |
| 31 | + Ruff will no longer look for a user-level configuration file at |
| 32 | + `~/Library/Application Support/ruff/ruff.toml` on macOS. This feature was |
| 33 | + deprecated in v0.5 in favor of using the [XDG |
| 34 | + specification](https://specifications.freedesktop.org/basedir-spec/latest/) |
| 35 | + (usually resolving to `~/.config/ruff/ruff.toml`), like on Linux. The |
| 36 | + fallback and accompanying deprecation warning have now been removed. |
| 37 | + |
| 38 | +- **[`pandas-df-variable-name`](https://docs.astral.sh/ruff/rules/pandas-df-variable-name) (`PD901`) has been removed** |
| 39 | + |
| 40 | +- **[`non-pep604-isinstance`](https://docs.astral.sh/ruff/rules/non-pep604-isinstance) (`UP038`) has been removed** |
| 41 | + |
3 | 42 | ## 0.12.0 |
4 | 43 |
|
5 | 44 | - **Detection of more syntax errors** |
|
0 commit comments