Use backticks for pep8-naming messages

This commit is contained in:
Charlie Marsh
2022-10-16 12:09:07 -04:00
parent c55fd76743
commit e79766d5ec
2 changed files with 10 additions and 10 deletions

View File

@@ -1213,19 +1213,19 @@ impl CheckKind {
CheckKind::NoOverIndentation => "Docstring is over-indented".to_string(),
// pep8-naming
CheckKind::InvalidClassName(name) => {
format!("class name '{name}' should use CapWords convention ")
format!("class name `{name}` should use CapWords convention ")
}
CheckKind::InvalidFunctionName(name) => {
format!("function name '{name}' should be lowercase")
format!("function name `{name}` should be lowercase")
}
CheckKind::InvalidArgumentName(name) => {
format!("argument name '{name}' should be lowercase")
format!("argument name `{name}` should be lowercase")
}
CheckKind::InvalidFirstArgumentNameForClassMethod => {
"first argument of a classmethod should be named 'cls'".to_string()
"first argument of a classmethod should be named `cls`".to_string()
}
CheckKind::InvalidFirstArgumentNameForMethod => {
"first argument of a method should be named 'self'".to_string()
"first argument of a method should be named `self`".to_string()
}
// Meta
CheckKind::UnusedNOQA(codes) => match codes {