mirror of https://github.com/astral-sh/ruff
Update pre-commit dependencies (#14719)
This commit is contained in:
parent
02d1e6a94a
commit
5a67d3269b
|
|
@ -22,7 +22,7 @@ repos:
|
||||||
- id: validate-pyproject
|
- id: validate-pyproject
|
||||||
|
|
||||||
- repo: https://github.com/executablebooks/mdformat
|
- repo: https://github.com/executablebooks/mdformat
|
||||||
rev: 0.7.18
|
rev: 0.7.19
|
||||||
hooks:
|
hooks:
|
||||||
- id: mdformat
|
- id: mdformat
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
|
|
@ -36,7 +36,7 @@ repos:
|
||||||
)$
|
)$
|
||||||
|
|
||||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||||
rev: v0.42.0
|
rev: v0.43.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: markdownlint-fix
|
- id: markdownlint-fix
|
||||||
exclude: |
|
exclude: |
|
||||||
|
|
@ -59,7 +59,7 @@ repos:
|
||||||
- black==24.10.0
|
- black==24.10.0
|
||||||
|
|
||||||
- repo: https://github.com/crate-ci/typos
|
- repo: https://github.com/crate-ci/typos
|
||||||
rev: v1.27.3
|
rev: v1.28.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: typos
|
- id: typos
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@ repos:
|
||||||
pass_filenames: false # This makes it a lot faster
|
pass_filenames: false # This makes it a lot faster
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.7.4
|
rev: v0.8.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-format
|
- id: ruff-format
|
||||||
- id: ruff
|
- id: ruff
|
||||||
|
|
@ -83,7 +83,7 @@ repos:
|
||||||
|
|
||||||
# Prettier
|
# Prettier
|
||||||
- repo: https://github.com/rbubley/mirrors-prettier
|
- repo: https://github.com/rbubley/mirrors-prettier
|
||||||
rev: v3.3.3
|
rev: v3.4.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
types: [yaml]
|
types: [yaml]
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
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,
|
Pycodestyle prefixes `E4`, `E7`, and `E9` to exclude rules that conflict with automatic formatters. Consequently,
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ The following fixes have been stabilized:
|
||||||
### Preview features
|
### Preview features
|
||||||
|
|
||||||
- Fix `E221` and `E222` to flag missing or extra whitespace around `==` operator ([#13890](https://github.com/astral-sh/ruff/pull/13890))
|
- 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))
|
- 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))
|
- \[`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
|
### Preview features
|
||||||
|
|
||||||
- \[`pycodestyle`\] Ignore end-of-line comments when determining blank line rules ([#11342](https://github.com/astral-sh/ruff/pull/11342))
|
- \[`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 `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))
|
- \[`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 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))
|
- \[`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))
|
- \[`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
|
### Documentation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
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`
|
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
|
(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`).
|
import the module" (e.g., `import foo.bar.baz`).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ called **once**.
|
||||||
|
|
||||||
## Profiling
|
## 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
|
```bash
|
||||||
RED_KNOT_LOG_PROFILE=1 red_knot -- --current-directory=../test -vvv
|
RED_KNOT_LOG_PROFILE=1 red_knot -- --current-directory=../test -vvv
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
implementation, we have to call `dangling_comments` manually and stub out the
|
||||||
`fmt_dangling_comments` default from `FormatNodeRule`.
|
`fmt_dangling_comments` default from `FormatNodeRule`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
settings are detected. In that case, show a warning and use
|
||||||
[`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) instead.
|
[`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.
|
warning will be displayed if settings specific to the native server are detected.
|
||||||
- `true`: Same as `on`
|
- `true`: Same as `on`
|
||||||
- `false`: Same as `off`
|
- `false`: Same as `off`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue