mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 13:33:50 +00:00
Run nightly Clippy over the Ruff repo (#5670)
## Summary
This is the result of running `cargo +nightly clippy --workspace
--all-targets --all-features -- -D warnings` and fixing all violations.
Just wanted to see if there were any interesting new checks on nightly
👀
This commit is contained in:
parent
e7e2f44440
commit
4dee49d6fa
40 changed files with 220 additions and 470 deletions
|
@ -436,7 +436,7 @@ mod tests {
|
|||
|
||||
let comment_ranges = comment_ranges.finish();
|
||||
|
||||
let parsed = parse_tokens(tokens.into_iter(), Mode::Module, "test.py")
|
||||
let parsed = parse_tokens(tokens, Mode::Module, "test.py")
|
||||
.expect("Expect source to be valid Python");
|
||||
|
||||
CommentsTestCase {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -26,7 +26,7 @@ impl<'ast> AsFormat<PyFormatContext<'ast>> for Mod {
|
|||
type Format<'a> = FormatRefWithRule<'a, Mod, FormatMod, PyFormatContext<'ast>>;
|
||||
|
||||
fn format(&self) -> Self::Format<'_> {
|
||||
FormatRefWithRule::new(self, FormatMod::default())
|
||||
FormatRefWithRule::new(self, FormatMod)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,6 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for Mod {
|
|||
type Format = FormatOwnedWithRule<Mod, FormatMod, PyFormatContext<'ast>>;
|
||||
|
||||
fn into_format(self) -> Self::Format {
|
||||
FormatOwnedWithRule::new(self, FormatMod::default())
|
||||
FormatOwnedWithRule::new(self, FormatMod)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ impl<'ast> AsFormat<PyFormatContext<'ast>> for Stmt {
|
|||
type Format<'a> = FormatRefWithRule<'a, Stmt, FormatStmt, PyFormatContext<'ast>>;
|
||||
|
||||
fn format(&self) -> Self::Format<'_> {
|
||||
FormatRefWithRule::new(self, FormatStmt::default())
|
||||
FormatRefWithRule::new(self, FormatStmt)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,6 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for Stmt {
|
|||
type Format = FormatOwnedWithRule<Stmt, FormatStmt, PyFormatContext<'ast>>;
|
||||
|
||||
fn into_format(self) -> Self::Format {
|
||||
FormatOwnedWithRule::new(self, FormatStmt::default())
|
||||
FormatOwnedWithRule::new(self, FormatStmt)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ impl<'def, 'ast> AsFormat<PyFormatContext<'ast>> for AnyFunctionDefinition<'def>
|
|||
> where Self: 'a;
|
||||
|
||||
fn format(&self) -> Self::Format<'_> {
|
||||
FormatRefWithRule::new(self, FormatAnyFunctionDef::default())
|
||||
FormatRefWithRule::new(self, FormatAnyFunctionDef)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue