mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
Improve magic value message wording (#1892)
The message previously specified 'number', but the error applies to more types.
This commit is contained in:
@@ -1277,7 +1277,7 @@ impl Violation for MagicValueComparison {
|
||||
fn message(&self) -> String {
|
||||
let MagicValueComparison(value) = self;
|
||||
format!(
|
||||
"Magic number used in comparison, consider replacing {value} with a constant variable"
|
||||
"Magic value used in comparison, consider replacing {value} with a constant variable"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user