diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 966503139d..d79bec076f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: validate-pyproject - repo: https://github.com/executablebooks/mdformat - rev: 0.7.18 + rev: 0.7.19 hooks: - id: mdformat additional_dependencies: @@ -36,7 +36,7 @@ repos: )$ - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.42.0 + rev: v0.43.0 hooks: - id: markdownlint-fix exclude: | @@ -59,7 +59,7 @@ repos: - black==24.10.0 - repo: https://github.com/crate-ci/typos - rev: v1.27.3 + rev: v1.28.1 hooks: - id: typos @@ -73,7 +73,7 @@ repos: pass_filenames: false # This makes it a lot faster - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.4 + rev: v0.8.1 hooks: - id: ruff-format - id: ruff @@ -83,7 +83,7 @@ repos: # Prettier - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.3.3 + rev: v3.4.1 hooks: - id: prettier types: [yaml] diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index e477ac2062..93adf49c75 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -192,7 +192,7 @@ flag or `unsafe-fixes` configuration option can be used to enable unsafe fixes. See the [docs](https://docs.astral.sh/ruff/configuration/#fix-safety) for details. -### Remove formatter-conflicting rules from the default rule set ([#7900](https://github.com/astral-sh/ruff/pull/7900)) +### Remove formatter-conflicting rules from the default rule set ([#7900](https://github.com/astral-sh/ruff/pull/7900)) Previously, Ruff enabled all implemented rules in Pycodestyle (`E`) by default. Ruff now only includes the Pycodestyle prefixes `E4`, `E7`, and `E9` to exclude rules that conflict with automatic formatters. Consequently, diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c43ec928..e50834a3a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -257,7 +257,7 @@ The following fixes have been stabilized: ### Preview features - Fix `E221` and `E222` to flag missing or extra whitespace around `==` operator ([#13890](https://github.com/astral-sh/ruff/pull/13890)) -- Formatter: Alternate quotes for strings inside f-strings in preview ([#13860](https://github.com/astral-sh/ruff/pull/13860)) +- Formatter: Alternate quotes for strings inside f-strings in preview ([#13860](https://github.com/astral-sh/ruff/pull/13860)) - Formatter: Join implicit concatenated strings when they fit on a line ([#13663](https://github.com/astral-sh/ruff/pull/13663)) - \[`pylint`\] Restrict `iteration-over-set` to only work on sets of literals (`PLC0208`) ([#13731](https://github.com/astral-sh/ruff/pull/13731)) @@ -1272,7 +1272,7 @@ To read more about this exciting milestone, check out our [blog post](https://as ### Preview features - \[`pycodestyle`\] Ignore end-of-line comments when determining blank line rules ([#11342](https://github.com/astral-sh/ruff/pull/11342)) -- \[`pylint`\] Detect `pathlib.Path.open` calls in `unspecified-encoding` (`PLW1514`) ([#11288](https://github.com/astral-sh/ruff/pull/11288)) +- \[`pylint`\] Detect `pathlib.Path.open` calls in `unspecified-encoding` (`PLW1514`) ([#11288](https://github.com/astral-sh/ruff/pull/11288)) - \[`flake8-pyi`\] Implement `PYI059` (`generic-not-last-base-class`) ([#11233](https://github.com/astral-sh/ruff/pull/11233)) - \[`flake8-pyi`\] Implement `PYI062` (`duplicate-literal-member`) ([#11269](https://github.com/astral-sh/ruff/pull/11269)) @@ -1647,7 +1647,7 @@ To setup `ruff server` with your editor, refer to the [README.md](https://github - \[`pycodestyle`\] Do not ignore lines before the first logical line in blank lines rules. ([#10382](https://github.com/astral-sh/ruff/pull/10382)) - \[`pycodestyle`\] Do not trigger `E225` and `E275` when the next token is a ')' ([#10315](https://github.com/astral-sh/ruff/pull/10315)) - \[`pylint`\] Avoid false-positive slot non-assignment for `__dict__` (`PLE0237`) ([#10348](https://github.com/astral-sh/ruff/pull/10348)) -- Gate f-string struct size test for Rustc \< 1.76 ([#10371](https://github.com/astral-sh/ruff/pull/10371)) +- Gate f-string struct size test for Rustc < 1.76 ([#10371](https://github.com/astral-sh/ruff/pull/10371)) ### Documentation diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43b2d68e1e..8d92c442ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -863,7 +863,7 @@ each configuration file. The package root is used to determine a file's "module path". Consider, again, `baz.py`. In that case, `./my_project/src/foo` was identified as the package root, so the module path for `baz.py` -would resolve to `foo.bar.baz` — as computed by taking the relative path from the package root +would resolve to `foo.bar.baz` — as computed by taking the relative path from the package root (inclusive of the root itself). The module path can be thought of as "the path you would use to import the module" (e.g., `import foo.bar.baz`). diff --git a/crates/red_knot/docs/tracing.md b/crates/red_knot/docs/tracing.md index 1b5feeadda..360d3bc87f 100644 --- a/crates/red_knot/docs/tracing.md +++ b/crates/red_knot/docs/tracing.md @@ -103,7 +103,7 @@ called **once**. ## Profiling -Red Knot generates a folded stack trace to the current directory named `tracing.folded` when setting the environment variable `RED_KNOT_LOG_PROFILE` to `1` or `true`. +Red Knot generates a folded stack trace to the current directory named `tracing.folded` when setting the environment variable `RED_KNOT_LOG_PROFILE` to `1` or `true`. ```bash RED_KNOT_LOG_PROFILE=1 red_knot -- --current-directory=../test -vvv diff --git a/crates/ruff_python_formatter/CONTRIBUTING.md b/crates/ruff_python_formatter/CONTRIBUTING.md index 540eb34748..3084ec3607 100644 --- a/crates/ruff_python_formatter/CONTRIBUTING.md +++ b/crates/ruff_python_formatter/CONTRIBUTING.md @@ -297,7 +297,7 @@ in `placement.rs`, which this section is about. ``` Here, the comment is dangling because it is preceded by `[`, which is a non-trivia token but not a -node, and followed by `]`, which is also a non-trivia token but not a node. In the `FormatExprList` +node, and followed by `]`, which is also a non-trivia token but not a node. In the `FormatExprList` implementation, we have to call `dangling_comments` manually and stub out the `fmt_dangling_comments` default from `FormatNodeRule`. diff --git a/docs/editors/settings.md b/docs/editors/settings.md index 9d200c9c94..cb695f43e9 100644 --- a/docs/editors/settings.md +++ b/docs/editors/settings.md @@ -710,7 +710,7 @@ automatically decide between the two based on the Ruff version and extension set 1. If the Ruff version is >= `0.5.3`, use the native language server unless any deprecated settings are detected. In that case, show a warning and use [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) instead. - 1. If the Ruff version is \< `0.5.3`, use [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp). A + 1. If the Ruff version is < `0.5.3`, use [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp). A warning will be displayed if settings specific to the native server are detected. - `true`: Same as `on` - `false`: Same as `off`