From 36172a565cf2de2201099e0083aa8f2d6796293a Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Wed, 20 Nov 2024 13:18:29 +0100 Subject: [PATCH] Unedited changelog / release changes --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++ Cargo.lock | 6 +++--- README.md | 6 +++--- crates/ruff/Cargo.toml | 2 +- crates/ruff_linter/Cargo.toml | 2 +- crates/ruff_wasm/Cargo.toml | 2 +- docs/integrations.md | 8 +++---- pyproject.toml | 2 +- scripts/benchmarks/pyproject.toml | 2 +- 9 files changed, 50 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c49510221a79b..e0a059e0569a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## 0.8.0 + +### Breaking changes + +- Ruff 0.8 ([#14383](https://github.com/MichaReiser/ruff/pull/14383)) + +### Preview features + +- Mark UP043 fix unsafe when the type annotation contains any comments ([#14458](https://github.com/astral-sh/ruff/pull/14458)) +- \[`flake8-pyi`\] Implement `redundant-none-literal` (`PYI061`) ([#14316](https://github.com/astral-sh/ruff/pull/14316)) +- \[`flake8-pyi`\] Implement autofix for `redundant-numeric-union` (`PYI041`) ([#14273](https://github.com/astral-sh/ruff/pull/14273)) +- \[`pycodestyle`\] Exempt `pytest.importorskip()` calls (`E402`) ([#14474](https://github.com/astral-sh/ruff/pull/14474)) +- \[`pydoclint`\] Update diagnostics to target the docstring ([#14381](https://github.com/astral-sh/ruff/pull/14381)) +- \[`pylint`\] - use sets when possible for `PLR1714` autofix (`repeated-equality-comparison`) ([#14372](https://github.com/astral-sh/ruff/pull/14372)) +- \[`ruff`\] Add rule forbidding `map(int, package.__version__.split('.'))` (`RUF048`) ([#14373](https://github.com/astral-sh/ruff/pull/14373)) +- \[`ruff`\] Implement `redundant-bool-literal` (`RUF038`) ([#14319](https://github.com/astral-sh/ruff/pull/14319)) +- \[`ruff`\] `re` and `regex` calls with unraw string as first argument (`RUF039`) ([#14446](https://github.com/astral-sh/ruff/pull/14446)) + +### Bug fixes + +- Avoid panic in unfixable `redundant-numeric-union` ([#14402](https://github.com/astral-sh/ruff/pull/14402)) +- Reverse order of `__contains__` arguments ([#14424](https://github.com/astral-sh/ruff/pull/14424)) +- \[`flake8-datetimez`\] Also exempt `.time()` (`DTZ901`) ([#14394](https://github.com/astral-sh/ruff/pull/14394)) +- \[`flake8-type-checking`\] Consider type expressions in list for quoting annotations ([#14371](https://github.com/astral-sh/ruff/pull/14371)) + +### Documentation + +- Improve rule & options documentation ([#14329](https://github.com/astral-sh/ruff/pull/14329)) +- Watch for changes to the generated file during documentation serve ([#14476](https://github.com/astral-sh/ruff/pull/14476)) +- \[`flake8-logging`\] Suggest `.getLogger(__name__)` instead of `.getLogger(__file__)` (`LOG015`) ([#14392](https://github.com/astral-sh/ruff/pull/14392)) + +### Other changes + +- \[`flake8-pie`\] Mark fix as unsafe if the following statement is a string literal (`PIE790`) ([#14393](https://github.com/astral-sh/ruff/pull/14393)) + ## 0.7.4 ### Preview features diff --git a/Cargo.lock b/Cargo.lock index 9f641455da69e..bbc6287fc515b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2489,7 +2489,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.7.4" +version = "0.8.0" dependencies = [ "anyhow", "argfile", @@ -2708,7 +2708,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.7.4" +version = "0.8.0" dependencies = [ "aho-corasick", "annotate-snippets 0.9.2", @@ -3023,7 +3023,7 @@ dependencies = [ [[package]] name = "ruff_wasm" -version = "0.7.4" +version = "0.8.0" dependencies = [ "console_error_panic_hook", "console_log", diff --git a/README.md b/README.md index c854682b50976..6c4b1dbc75997 100644 --- a/README.md +++ b/README.md @@ -136,8 +136,8 @@ curl -LsSf https://astral.sh/ruff/install.sh | sh powershell -c "irm https://astral.sh/ruff/install.ps1 | iex" # For a specific version. -curl -LsSf https://astral.sh/ruff/0.7.4/install.sh | sh -powershell -c "irm https://astral.sh/ruff/0.7.4/install.ps1 | iex" +curl -LsSf https://astral.sh/ruff/0.8.0/install.sh | sh +powershell -c "irm https://astral.sh/ruff/0.8.0/install.ps1 | iex" ``` You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff), @@ -170,7 +170,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.7.4 + rev: v0.8.0 hooks: # Run the linter. - id: ruff diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index d1c074182061b..1fd0889ce523b 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff" -version = "0.7.4" +version = "0.8.0" publish = true authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_linter/Cargo.toml b/crates/ruff_linter/Cargo.toml index 2b1f598c88fe0..d2adeffbe1ad7 100644 --- a/crates/ruff_linter/Cargo.toml +++ b/crates/ruff_linter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_linter" -version = "0.7.4" +version = "0.8.0" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_wasm/Cargo.toml b/crates/ruff_wasm/Cargo.toml index 5ca23fe987d12..8186cd6840464 100644 --- a/crates/ruff_wasm/Cargo.toml +++ b/crates/ruff_wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_wasm" -version = "0.7.4" +version = "0.8.0" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/docs/integrations.md b/docs/integrations.md index e84cd0a92fc15..acf18682a6fc1 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -80,7 +80,7 @@ You can add the following configuration to `.gitlab-ci.yml` to run a `ruff forma stage: build interruptible: true image: - name: ghcr.io/astral-sh/ruff:0.7.4-alpine + name: ghcr.io/astral-sh/ruff:0.8.0-alpine before_script: - cd $CI_PROJECT_DIR - ruff --version @@ -106,7 +106,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.7.4 + rev: v0.8.0 hooks: # Run the linter. - id: ruff @@ -119,7 +119,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.7.4 + rev: v0.8.0 hooks: # Run the linter. - id: ruff @@ -133,7 +133,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.7.4 + rev: v0.8.0 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index e2279fb9cc196..9685ccaccc4fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ruff" -version = "0.7.4" +version = "0.8.0" 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 7dc11ad007b3b..7af491c4b620c 100644 --- a/scripts/benchmarks/pyproject.toml +++ b/scripts/benchmarks/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scripts" -version = "0.7.4" +version = "0.8.0" description = "" authors = ["Charles Marsh "]