Use #[expect(lint)] over #[allow(lint)] where possible (#17822)

This commit is contained in:
Micha Reiser 2025-05-03 21:20:31 +02:00 committed by GitHub
parent 8535af8516
commit fa628018b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
148 changed files with 221 additions and 268 deletions

View file

@ -98,7 +98,7 @@ pub struct FixerResult<'a> {
}
/// Generate [`Message`]s from the source code contents at the given `Path`.
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
pub fn check_path(
path: &Path,
package: Option<PackageRoot<'_>>,
@ -538,7 +538,6 @@ fn diagnostics_to_messages(
/// Generate `Diagnostic`s from source code content, iteratively fixing
/// until stable.
#[allow(clippy::too_many_arguments)]
pub fn lint_fix<'a>(
path: &Path,
package: Option<PackageRoot<'_>>,
@ -672,7 +671,7 @@ fn collect_rule_codes(rules: impl IntoIterator<Item = Rule>) -> String {
.join(", ")
}
#[allow(clippy::print_stderr)]
#[expect(clippy::print_stderr)]
fn report_failed_to_converge_error(path: &Path, transformed: &str, messages: &[Message]) {
let codes = collect_rule_codes(messages.iter().filter_map(Message::rule));
if cfg!(debug_assertions) {
@ -705,7 +704,7 @@ This indicates a bug in Ruff. If you could open an issue at:
}
}
#[allow(clippy::print_stderr)]
#[expect(clippy::print_stderr)]
fn report_fix_syntax_error(
path: &Path,
transformed: &str,