0.11.0
Breaking Changes📦 ruffView on GitHub →
⚠ 1 breaking✨ 1 features
Summary
Ruff 0.11.0 introduces updated Python version inference based on `requires-python`, stabilizes PGH004 detection, and adds a preview syntax-errors feature for tuple unpacking before Python 3.9.
⚠️ Breaking Changes
- Changes to how the Python version is inferred when a `target-version` is not specified. Ruff now respects the `requires-python` field from the nearest `pyproject.toml` (even without a `[tool.ruff]` section) and gives it precedence over defaults. Update your configuration if you relied on the previous default behavior.
Migration Steps
- If you previously relied on Ruff defaulting to Python 3.9 when no `target-version` was set, verify that your `pyproject.toml` `requires-python` field is correctly set, or explicitly add a `target-version` in `ruff.toml` or `[tool.ruff]`.
- Review any custom config discovery logic to ensure it aligns with the new precedence rules.
✨ New Features
- Preview feature: syntax-errors – support for tuple unpacking in `for` statement iterator clause on Python versions prior to 3.9.