1
3
mirror of https://github.com/charliermarsh/ruff synced 2025-10-05 23:52:47 +02:00

Update rust toolchain to 1.90 (#20469)

This commit is contained in:
Micha Reiser
2025-09-18 16:54:49 +02:00
committed by GitHub
parent 2502ff7638
commit 1758f26d94
5 changed files with 4 additions and 5 deletions

View File

@@ -487,7 +487,6 @@ impl<'a> Iterator for PathParamIterator<'a> {
let param_name_end = param_content.find(':').unwrap_or(param_content.len());
let param_name = &param_content[..param_name_end];
#[expect(clippy::range_plus_one)]
return Some((param_name, start..end + 1));
}
}

View File

@@ -269,7 +269,7 @@ pub(crate) fn indentation(
range: TextRange,
context: &LintContext,
) {
if indent_level % indent_size != 0 {
if !indent_level.is_multiple_of(indent_size) {
if logical_line.is_comment_only() {
context.report_diagnostic_if_enabled(
IndentationWithInvalidMultipleComment {

View File

@@ -1613,7 +1613,7 @@ pub(super) fn needs_chaperone_space(
if is_no_chaperone_for_escaped_quote_in_triple_quoted_docstring_enabled(context) {
if flags.is_triple_quoted() {
if let Some(before_quote) = trim_end.strip_suffix(flags.quote_style().as_char()) {
if count_consecutive_chars_from_end(before_quote, '\\') % 2 == 0 {
if count_consecutive_chars_from_end(before_quote, '\\').is_multiple_of(2) {
// Even backslash count preceding quote;
// ```py
// """a " """

View File

@@ -250,7 +250,7 @@ impl ProgressReporter for WorkspaceDiagnosticsProgressReporter<'_> {
fn report_checked_file(&self, db: &dyn Db, file: File, diagnostics: &[Diagnostic]) {
let checked = self.checked_files.fetch_add(1, Ordering::Relaxed) + 1;
if checked % 100 == 0 || checked == self.total_files {
if checked.is_multiple_of(100) || checked == self.total_files {
// Report progress every 100 files or when all files are checked
self.report_progress();
}

View File

@@ -1,2 +1,2 @@
[toolchain]
channel = "1.89"
channel = "1.90"