Skip to content

Commit

Permalink
Update crates/ruff_linter/src/rules/flake8_use_pathlib/rules/invalid_…
Browse files Browse the repository at this point in the history
…pathlib_with_suffix.rs

Co-authored-by: Dylan <[email protected]>
  • Loading branch information
TheBits and dylwil3 authored Dec 12, 2024
1 parent 601687f commit 49e6eef
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ impl Violation for InvalidPathlibWithSuffix {

#[derive_message_formats]
fn message(&self) -> String {
"Invalid suffix passed to `.with_suffix()`".to_string()
if !self.single_dot {"Dotless suffix passed to `.with_suffix()`".to_string()} else {
"Invalid suffix passed to `.with_suffix()`".to_string()
}
}

fn fix_title(&self) -> Option<String> {
Expand Down

0 comments on commit 49e6eef

Please sign in to comment.