diff --git a/CHANGELOG.md b/CHANGELOG.md index 251f0c919057e..ee2a8cf4ce3b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## 0.1.3 + +This release includes a variety of improvements to the Ruff formatter, removing several known and +unintentional deviations from Black. + +### Formatter + +- Avoid space around pow for `None`, `True` and `False` ([#8189](https://github.com/astral-sh/ruff/pull/8189)) +- Avoid sorting all paths in the format command ([#8181](https://github.com/astral-sh/ruff/pull/8181)) +- Insert necessary blank line between class and leading comments ([#8224](https://github.com/astral-sh/ruff/pull/8224)) +- Avoid introducing new parentheses in annotated assignments ([#8233](https://github.com/astral-sh/ruff/pull/8233)) +- Refine the warnings about incompatible linter options ([#8196](https://github.com/astral-sh/ruff/pull/8196)) +- Add test and basic implementation for formatter preview mode ([#8044](https://github.com/astral-sh/ruff/pull/8044)) +- Refine warning about incompatible `isort` settings ([#8192](https://github.com/astral-sh/ruff/pull/8192)) +- Only omit optional parentheses for starting or ending with parentheses ([#8238](https://github.com/astral-sh/ruff/pull/8238)) +- Use source type to determine parser mode for formatting ([#8205](https://github.com/astral-sh/ruff/pull/8205)) +- Don't warn about magic trailing comma when `isort.force-single-line` is true ([#8244](https://github.com/astral-sh/ruff/pull/8244)) +- Use `SourceKind::diff` for formatter ([#8240](https://github.com/astral-sh/ruff/pull/8240)) +- Fix `fmt:off` with trailing child comment ([#8234](https://github.com/astral-sh/ruff/pull/8234)) +- Formatter parentheses support for `IpyEscapeCommand` ([#8207](https://github.com/astral-sh/ruff/pull/8207)) + +### Linter + +- \[`pylint`\] Add buffer methods to `bad-dunder-method-name` (`PLW3201`) exclusions ([#8190](https://github.com/astral-sh/ruff/pull/8190)) +- Match rule prefixes from `external` codes setting in `unused-noqa` ([#8177](https://github.com/astral-sh/ruff/pull/8177)) +- Use `line-length` setting for isort in lieu of `pycodestyle.max-line-length` ([#8235](https://github.com/astral-sh/ruff/pull/8235)) +- Update fix for `unnecessary-paren-on-raise-exception` to unsafe for unknown types ([#8231](https://github.com/astral-sh/ruff/pull/8231)) +- Correct quick fix message for `W605` ([#8255](https://github.com/astral-sh/ruff/pull/8255)) + +### Documentation + +- Fix typo in max-doc-length documentation ([#8201](https://github.com/astral-sh/ruff/pull/8201)) +- Improve documentation around linter-formatter conflicts ([#8257](https://github.com/astral-sh/ruff/pull/8257)) +- Fix link to error suppression documentation in `unused-noqa` ([#8172](https://github.com/astral-sh/ruff/pull/8172)) +- Add `external` option to `unused-noqa` documentation ([#8171](https://github.com/astral-sh/ruff/pull/8171)) +- Add title attribute to icons ([#8060](https://github.com/astral-sh/ruff/pull/8060)) +- Clarify unsafe case in RSE102 ([#8256](https://github.com/astral-sh/ruff/pull/8256)) +- Fix skipping formatting examples ([#8210](https://github.com/astral-sh/ruff/pull/8210)) +- docs: fix name of `magic-trailing-comma` option in README ([#8200](https://github.com/astral-sh/ruff/pull/8200)) +- Add note about scope of rule changing in versioning policy ([#8169](https://github.com/astral-sh/ruff/pull/8169)) +- Document: Fix default lint rules ([#8218](https://github.com/astral-sh/ruff/pull/8218)) +- Fix a wrong setting in configuration.md ([#8186](https://github.com/astral-sh/ruff/pull/8186)) +- Fix misspelled TOML headers in the tutorial ([#8209](https://github.com/astral-sh/ruff/pull/8209)) + ## 0.1.2 This release includes the Beta version of the Ruff formatter — an extremely fast, Black-compatible Python formatter. diff --git a/Cargo.lock b/Cargo.lock index e4e5a1a51c02c..bf3a5c1c61233 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -810,7 +810,7 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flake8-to-ruff" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "clap", @@ -2051,7 +2051,7 @@ dependencies = [ [[package]] name = "ruff_cli" -version = "0.1.2" +version = "0.1.3" dependencies = [ "annotate-snippets 0.9.1", "anyhow", @@ -2188,7 +2188,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.1.2" +version = "0.1.3" dependencies = [ "aho-corasick", "annotate-snippets 0.9.1", @@ -2438,7 +2438,7 @@ dependencies = [ [[package]] name = "ruff_shrinking" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "clap", diff --git a/README.md b/README.md index 3cb08c5397960..0ddd1da460cc3 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff # Run the Ruff linter. - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.2 + rev: v0.1.3 hooks: # Run the Ruff linter. - id: ruff diff --git a/crates/flake8_to_ruff/Cargo.toml b/crates/flake8_to_ruff/Cargo.toml index 63e1bf2c884e2..2d9ba8551c754 100644 --- a/crates/flake8_to_ruff/Cargo.toml +++ b/crates/flake8_to_ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flake8-to-ruff" -version = "0.1.2" +version = "0.1.3" description = """ Convert Flake8 configuration files to Ruff configuration files. """ diff --git a/crates/ruff_cli/Cargo.toml b/crates/ruff_cli/Cargo.toml index f33ab771dee29..6805f4861dfac 100644 --- a/crates/ruff_cli/Cargo.toml +++ b/crates/ruff_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_cli" -version = "0.1.2" +version = "0.1.3" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_linter/Cargo.toml b/crates/ruff_linter/Cargo.toml index a68c72ff5d360..a1d87ef4e61fd 100644 --- a/crates/ruff_linter/Cargo.toml +++ b/crates/ruff_linter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_linter" -version = "0.1.2" +version = "0.1.3" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_shrinking/Cargo.toml b/crates/ruff_shrinking/Cargo.toml index baf09e0959f81..8c6276e182f9b 100644 --- a/crates/ruff_shrinking/Cargo.toml +++ b/crates/ruff_shrinking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_shrinking" -version = "0.1.2" +version = "0.1.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/docs/tutorial.md b/docs/tutorial.md index 3fa2b6d974c5c..25b2a7023eb57 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -284,13 +284,13 @@ This tutorial has focused on Ruff's command-line interface, but Ruff can also be # Run the Ruff linter. - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.2 + rev: v0.1.3 hooks: - id: ruff # Run the Ruff formatter. - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.291 + rev: v0.1.3 hooks: - id: ruff-format ``` diff --git a/pyproject.toml b/pyproject.toml index cfe5c81604061..e194ff3497030 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ruff" -version = "0.1.2" +version = "0.1.3" description = "An extremely fast Python linter, 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 4b83615bcb2c2..744a1f4b3a642 100644 --- a/scripts/benchmarks/pyproject.toml +++ b/scripts/benchmarks/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scripts" -version = "0.1.2" +version = "0.1.3" description = "" authors = ["Charles Marsh "]