mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-08 09:30:27 +00:00
Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary I decided to disable the new [`needless_continue`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue) rule because I often found the explicit `continue` more readable over an empty block or having to invert the condition of an other branch. ## Test Plan `cargo test` --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
fedd982fd5
commit
8a4158c5f8
135 changed files with 285 additions and 255 deletions
|
@ -518,8 +518,8 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for Expr {
|
|||
///
|
||||
/// We prefer parentheses at least in the following cases:
|
||||
/// * The expression contains more than one unparenthesized expression with the same precedence. For example,
|
||||
/// the expression `a * b * c` contains two multiply operations. We prefer parentheses in that case.
|
||||
/// `(a * b) * c` or `a * b + c` are okay, because the subexpression is parenthesized, or the expression uses operands with a lower precedence
|
||||
/// the expression `a * b * c` contains two multiply operations. We prefer parentheses in that case.
|
||||
/// `(a * b) * c` or `a * b + c` are okay, because the subexpression is parenthesized, or the expression uses operands with a lower precedence
|
||||
/// * The expression contains at least one parenthesized sub expression (optimization to avoid unnecessary work)
|
||||
///
|
||||
/// This mimics Black's [`_maybe_split_omitting_optional_parens`](https://github.com/psf/black/blob/d1248ca9beaf0ba526d265f4108836d89cf551b7/src/black/linegen.py#L746-L820)
|
||||
|
@ -787,7 +787,7 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> {
|
|||
| Expr::IpyEscapeCommand(_) => {
|
||||
return;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
walk_expr(self, expr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue