mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Re-enable clippy useless-format
(#14095)
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo shear (push) Blocked by required conditions
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz (push) Blocked by required conditions
CI / Fuzz the parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo shear (push) Blocked by required conditions
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz (push) Blocked by required conditions
CI / Fuzz the parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
This commit is contained in:
parent
fb94b71e63
commit
b7e32b0a18
6 changed files with 7 additions and 5 deletions
|
@ -85,7 +85,8 @@ pub struct ReturnInGenerator;
|
|||
impl Violation for ReturnInGenerator {
|
||||
#[derive_message_formats]
|
||||
fn message(&self) -> String {
|
||||
format!("Using `yield` and `return {{value}}` in a generator function can lead to confusing behavior")
|
||||
"Using `yield` and `return {value}` in a generator function can lead to confusing behavior"
|
||||
.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ impl Violation for UnnecessaryLiteralUnion {
|
|||
}
|
||||
|
||||
fn fix_title(&self) -> Option<String> {
|
||||
Some(format!("Replace with a single `Literal`",))
|
||||
Some("Replace with a single `Literal`".to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ impl Violation for UnnecessaryTypeUnion {
|
|||
#[derive_message_formats]
|
||||
fn message(&self) -> String {
|
||||
let union_str = if self.is_pep604_union {
|
||||
format!("{}", self.members.join(" | "))
|
||||
self.members.join(" | ")
|
||||
} else {
|
||||
format!("Union[{}]", self.members.join(", "))
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#![allow(clippy::useless_format)]
|
||||
pub mod airflow;
|
||||
pub mod eradicate;
|
||||
pub mod fastapi;
|
||||
|
|
|
@ -30,6 +30,8 @@ pub struct IOError {
|
|||
|
||||
/// E902
|
||||
impl Violation for IOError {
|
||||
// The format message is used by the `derive_message_formats` macro.
|
||||
#![allow(clippy::useless_format)]
|
||||
#[derive_message_formats]
|
||||
fn message(&self) -> String {
|
||||
let IOError { message } = self;
|
||||
|
|
|
@ -53,7 +53,7 @@ impl Violation for EscapeSequenceInDocstring {
|
|||
}
|
||||
|
||||
fn fix_title(&self) -> Option<String> {
|
||||
Some(format!(r#"Add `r` prefix"#))
|
||||
Some(r#"Add `r` prefix"#.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue