From 6d894ff31075ac808db59e1b8d49e92edbda50f4 Mon Sep 17 00:00:00 2001 From: Jane Lewis Date: Wed, 22 May 2024 17:40:22 -0700 Subject: [PATCH 1/4] Bump version to v0.4.5 and create changelog --- CHANGELOG.md | 67 +++++++++++++++++++++++++++++++ Cargo.lock | 4 +- README.md | 2 +- crates/ruff/Cargo.toml | 2 +- crates/ruff_linter/Cargo.toml | 2 +- docs/integrations.md | 6 +-- pyproject.toml | 2 +- scripts/benchmarks/pyproject.toml | 2 +- 8 files changed, 77 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 212248487be9a..ccd7245ec45fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,72 @@ # Changelog +## 0.4.5 + +### Ruff's language server is now in Beta + +`v0.4.5` marks the official Beta release of `ruff server`, an integrated language server built into Ruff. +`ruff server` does everything `ruff-lsp` does and more, bringing significant improvements to performance along the way. + +To read more about this exciting milestone, check out our [blog post](https://astral.sh/blog/ruff-v0.4.5)! + +### Rule changes + +- \[`flake8-future-annotations`\] Reword `future-rewritable-type-annotation` (`FA100`) message ([#11381](https://github.com/astral-sh/ruff/pull/11381)) +- \[`pycodestyle`\] Consider soft keywords for `E27` rules ([#11446](https://github.com/astral-sh/ruff/pull/11446)) +- \[`pyflakes`\] Recommend adding unused import bindings to `__all__` ([#11314](https://github.com/astral-sh/ruff/pull/11314)) +- \[`pyflakes`\] Update documentation and deprecate `ignore_init_module_imports` ([#11436](https://github.com/astral-sh/ruff/pull/11436)) +- \[`pyupgrade`\] Mark quotes as unnecessary for non-evaluated annotations ([#11485](https://github.com/astral-sh/ruff/pull/11485)) + +### Formatter + +- Avoid multiline quotes warning with `quote-style = preserve` ([#11490](https://github.com/astral-sh/ruff/pull/11490)) + +### Server + +- Support Jupyter Notebook files ([#11206](https://github.com/astral-sh/ruff/pull/11206)) +- Support `noqa` comment code actions ([#11276](https://github.com/astral-sh/ruff/pull/11276)) +- Fix automatic configuration reloading ([#11492](https://github.com/astral-sh/ruff/pull/11492)) +- Fix several issues with configuration in Neovim and Helix ([#11497](https://github.com/astral-sh/ruff/pull/11497)) + +### CLI + +- Add `--output-format` as a CLI option for `ruff config` ([#11438](https://github.com/astral-sh/ruff/pull/11438)) + +### Bug fixes + +- Avoid `PLE0237` for property with setter ([#11377](https://github.com/astral-sh/ruff/pull/11377)) +- Avoid `TCH005` for `if` stmt with `elif`/`else` block ([#11376](https://github.com/astral-sh/ruff/pull/11376)) +- Avoid flagging `__future__` annotations as required for non-evaluated type annotations ([#11414](https://github.com/astral-sh/ruff/pull/11414)) +- Check for ruff executable in 'bin' directory as installed by 'pip install --target'. ([#11450](https://github.com/astral-sh/ruff/pull/11450)) +- Sort edits prior to deduplicating in quotation fix ([#11452](https://github.com/astral-sh/ruff/pull/11452)) +- Treat escaped newline as valid sequence ([#11465](https://github.com/astral-sh/ruff/pull/11465)) +- \[`flake8-pie`\] Preserve parentheses in `unnecessary-dict-kwargs` ([#11372](https://github.com/astral-sh/ruff/pull/11372)) +- \[`pylint`\] Ignore `__slots__` with dynamic values ([#11488](https://github.com/astral-sh/ruff/pull/11488)) +- \[`pylint`\] Remove `try` body from branch counting ([#11487](https://github.com/astral-sh/ruff/pull/11487)) +- \[`refurb`\] Respect operator precedence in `FURB110` ([#11464](https://github.com/astral-sh/ruff/pull/11464)) + +### Documentation + +- Add a note on `--preview` to the README ([#11395](https://github.com/astral-sh/ruff/pull/11395)) +- Simplify Neovim setup documentation ([#11489](https://github.com/astral-sh/ruff/pull/11489)) +- Update CONTRIBUTING.md to reflect the new parser ([#11434](https://github.com/astral-sh/ruff/pull/11434)) +- Update server documentation with new migration guide ([#11499](https://github.com/astral-sh/ruff/pull/11499)) +- \[`pycodestyle`\] Clarify motivation for `E713` and `E714` ([#11483](https://github.com/astral-sh/ruff/pull/11483)) +- \[`pyflakes`\] Update docs to describe WAI behavior (F541) ([#11362](https://github.com/astral-sh/ruff/pull/11362)) +- \[`pylint`\] Clearly indicate what is counted as a branch ([#11423](https://github.com/astral-sh/ruff/pull/11423)) + +## CI + +- Add automation for updating our vendored typeshed stubs ([#11427](https://github.com/astral-sh/ruff/pull/11427)) + +## Internal + +- Migrate `sys.rs` generation to `stdlibs` ([#11374](https://github.com/astral-sh/ruff/pull/11374)) + +### Other changes + +- Add Python 3.13 to list of allowed Python versions ([#11411](https://github.com/astral-sh/ruff/pull/11411)) + ## 0.4.4 ### Preview features diff --git a/Cargo.lock b/Cargo.lock index 4f9421a8e5097..6efb7b99e761d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1939,7 +1939,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.4.4" +version = "0.4.5" dependencies = [ "anyhow", "argfile", @@ -2100,7 +2100,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.4.4" +version = "0.4.5" dependencies = [ "aho-corasick", "annotate-snippets 0.9.2", diff --git a/README.md b/README.md index 015688b7b81c1..5fee77239b628 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,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.4.4 + rev: v0.4.5 hooks: # Run the linter. - id: ruff diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index abb022e38beca..d6d3fb9be4964 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff" -version = "0.4.4" +version = "0.4.5" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_linter/Cargo.toml b/crates/ruff_linter/Cargo.toml index d2b635f0cea20..1aaf2d30b7df5 100644 --- a/crates/ruff_linter/Cargo.toml +++ b/crates/ruff_linter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_linter" -version = "0.4.4" +version = "0.4.5" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/docs/integrations.md b/docs/integrations.md index 2dfd16e0b1f4e..906aa45b41304 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.4.4 + rev: v0.4.5 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.4.4 + rev: v0.4.5 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.4.4 + rev: v0.4.5 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 66e9930223fbb..06ff560c26293 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ruff" -version = "0.4.4" +version = "0.4.5" 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 8c63d531004d4..8a0d41deefb12 100644 --- a/scripts/benchmarks/pyproject.toml +++ b/scripts/benchmarks/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scripts" -version = "0.4.4" +version = "0.4.5" description = "" authors = ["Charles Marsh "] From 1b79b86e6d849c8118d0f6609131d93b722e84d7 Mon Sep 17 00:00:00 2001 From: Jane Lewis Date: Wed, 22 May 2024 17:45:04 -0700 Subject: [PATCH 2/4] Remove Python version changelog entry --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccd7245ec45fc..86e2d7d438a7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,10 +63,6 @@ To read more about this exciting milestone, check out our [blog post](https://as - Migrate `sys.rs` generation to `stdlibs` ([#11374](https://github.com/astral-sh/ruff/pull/11374)) -### Other changes - -- Add Python 3.13 to list of allowed Python versions ([#11411](https://github.com/astral-sh/ruff/pull/11411)) - ## 0.4.4 ### Preview features From 41c861e45979a0850f2d5d7bb05d4d260bec7b81 Mon Sep 17 00:00:00 2001 From: Jane Lewis Date: Wed, 22 May 2024 17:55:37 -0700 Subject: [PATCH 3/4] Remove a few changelog sections --- CHANGELOG.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e2d7d438a7f..2916d840ec652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,14 +55,6 @@ To read more about this exciting milestone, check out our [blog post](https://as - \[`pyflakes`\] Update docs to describe WAI behavior (F541) ([#11362](https://github.com/astral-sh/ruff/pull/11362)) - \[`pylint`\] Clearly indicate what is counted as a branch ([#11423](https://github.com/astral-sh/ruff/pull/11423)) -## CI - -- Add automation for updating our vendored typeshed stubs ([#11427](https://github.com/astral-sh/ruff/pull/11427)) - -## Internal - -- Migrate `sys.rs` generation to `stdlibs` ([#11374](https://github.com/astral-sh/ruff/pull/11374)) - ## 0.4.4 ### Preview features From 7201e33cca88c8ad59b670c410487fcdb6af3a67 Mon Sep 17 00:00:00 2001 From: Jane Lewis Date: Wed, 22 May 2024 18:04:24 -0700 Subject: [PATCH 4/4] Address suggestions --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2916d840ec652..1702f414189b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,11 @@ ### Ruff's language server is now in Beta `v0.4.5` marks the official Beta release of `ruff server`, an integrated language server built into Ruff. -`ruff server` does everything `ruff-lsp` does and more, bringing significant improvements to performance along the way. +`ruff server` supports the same feature set as `ruff-lsp`, powering linting, formatting, and +code fixes in Ruff's editor integrations -- but with superior performance and +no installation required. We'd love your feedback! + +You can enable `ruff server` in the [VS Code extension](https://github.com/astral-sh/ruff-vscode?tab=readme-ov-file#enabling-the-rust-based-language-server) today. To read more about this exciting milestone, check out our [blog post](https://astral.sh/blog/ruff-v0.4.5)! @@ -47,7 +51,8 @@ To read more about this exciting milestone, check out our [blog post](https://as ### Documentation -- Add a note on `--preview` to the README ([#11395](https://github.com/astral-sh/ruff/pull/11395)) +- Add `--preview` to the README ([#11395](https://github.com/astral-sh/ruff/pull/11395)) +- Add Python 3.13 to list of allowed Python versions ([#11411](https://github.com/astral-sh/ruff/pull/11411)) - Simplify Neovim setup documentation ([#11489](https://github.com/astral-sh/ruff/pull/11489)) - Update CONTRIBUTING.md to reflect the new parser ([#11434](https://github.com/astral-sh/ruff/pull/11434)) - Update server documentation with new migration guide ([#11499](https://github.com/astral-sh/ruff/pull/11499))