diff --git a/CHANGELOG.md b/CHANGELOG.md index b03aa96f7da4c..1669c5b1c58b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,50 @@ # Changelog +## 0.2.1 + +This release includes support for range formatting (i.e., the ability to format specific lines +within a source file). + +### Preview features + +- \[`refurn`\] Implement `missing-f-string-syntax` (`RUF027`) ([#9728](https://github.com/astral-sh/ruff/pull/9728)) +- Format module-level docstrings ([#9725](https://github.com/astral-sh/ruff/pull/9725)) + +### Formatter + +- Add `--range` option to `ruff format` ([#9733](https://github.com/astral-sh/ruff/pull/9733)) +- Don't trim last empty line in docstrings ([#9813](https://github.com/astral-sh/ruff/pull/9813)) + +### Bug fixes + +- Skip empty lines when determining base indentation ([#9795](https://github.com/astral-sh/ruff/pull/9795)) +- Drop `__get__` and `__set__` from `unnecessary-dunder-call` ([#9791](https://github.com/astral-sh/ruff/pull/9791)) +- Respect generic `Protocol` in ellipsis removal ([#9841](https://github.com/astral-sh/ruff/pull/9841)) +- Revert "Use publicly available Apple Silicon runners (#9726)" ([#9834](https://github.com/astral-sh/ruff/pull/9834)) + +### Performance + +- Skip LibCST parsing for standard dedent adjustments ([#9769](https://github.com/astral-sh/ruff/pull/9769)) +- Remove CST-based fixer for `C408` ([#9822](https://github.com/astral-sh/ruff/pull/9822)) +- Add our own ignored-names abstractions ([#9802](https://github.com/astral-sh/ruff/pull/9802)) +- Remove CST-based fixers for `C400`, `C401`, `C410`, and `C418` ([#9819](https://github.com/astral-sh/ruff/pull/9819)) +- Use `AhoCorasick` to speed up quote match ([#9773](https://github.com/astral-sh/ruff/pull/9773)) +- Remove CST-based fixers for `C405` and `C409` ([#9821](https://github.com/astral-sh/ruff/pull/9821)) +- Add fast-path for comment detection ([#9808](https://github.com/astral-sh/ruff/pull/9808)) +- Invert order of checks in `zero-sleep-call` ([#9766](https://github.com/astral-sh/ruff/pull/9766)) +- Short-circuit typing matches based on imports ([#9800](https://github.com/astral-sh/ruff/pull/9800)) +- Run dunder method rule on methods directly ([#9815](https://github.com/astral-sh/ruff/pull/9815)) +- Track top-level module imports in the semantic model ([#9775](https://github.com/astral-sh/ruff/pull/9775)) +- Slight speed-up for lowercase and uppercase identifier checks ([#9798](https://github.com/astral-sh/ruff/pull/9798)) +- Remove LibCST-based fixer for `C403` ([#9818](https://github.com/astral-sh/ruff/pull/9818)) + +### Documentation + +- Update `max-pos-args` example to `max-positional-args` ([#9797](https://github.com/astral-sh/ruff/pull/9797)) +- Fixed example code in `weak_cryptographic_key.rs` ([#9774](https://github.com/astral-sh/ruff/pull/9774)) +- Fix references to deprecated `ANN` rules in changelog ([#9771](https://github.com/astral-sh/ruff/pull/9771)) +- Fix default for `max-positional-args` ([#9838](https://github.com/astral-sh/ruff/pull/9838)) + ## 0.2.0 ### Breaking changes diff --git a/Cargo.lock b/Cargo.lock index e0035b5c39728..00425134381c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2005,7 +2005,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "argfile", @@ -2165,7 +2165,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.2.0" +version = "0.2.1" dependencies = [ "aho-corasick", "annotate-snippets 0.9.2", @@ -2419,7 +2419,7 @@ dependencies = [ [[package]] name = "ruff_shrinking" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "clap", diff --git a/README.md b/README.md index 55326cdc5a12e..962fe3ed1427e 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.2.0 + rev: v0.2.1 hooks: # Run the linter. - id: ruff diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index c658143fc85c9..ccd6a507e2cbd 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff" -version = "0.2.0" +version = "0.2.1" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_linter/Cargo.toml b/crates/ruff_linter/Cargo.toml index 1239b387a8bf4..a674848dfcfab 100644 --- a/crates/ruff_linter/Cargo.toml +++ b/crates/ruff_linter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_linter" -version = "0.2.0" +version = "0.2.1" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_shrinking/Cargo.toml b/crates/ruff_shrinking/Cargo.toml index 38c09fa82be07..6e100a9036ee9 100644 --- a/crates/ruff_shrinking/Cargo.toml +++ b/crates/ruff_shrinking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_shrinking" -version = "0.2.0" +version = "0.2.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/docs/integrations.md b/docs/integrations.md index 4df09859664c1..098079ca5709b 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -14,7 +14,7 @@ Ruff can be used as a [pre-commit](https://pre-commit.com) hook via [`ruff-pre-c ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.2.0 + rev: v0.2.1 hooks: # Run the linter. - id: ruff @@ -27,7 +27,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.2.0 + rev: v0.2.1 hooks: # Run the linter. - id: ruff @@ -41,7 +41,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.2.0 + rev: v0.2.1 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index c00ff6a0e0b82..3c48451d8d3de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ruff" -version = "0.2.0" +version = "0.2.1" description = "An extremely fast Python linter and code formatter, written in Rust." authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }] readme = "README.md" diff --git a/scripts/benchmarks/pyproject.toml b/scripts/benchmarks/pyproject.toml index da6c01fa56c2c..de851b89803b3 100644 --- a/scripts/benchmarks/pyproject.toml +++ b/scripts/benchmarks/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scripts" -version = "0.2.0" +version = "0.2.1" description = "" authors = ["Charles Marsh "]