mirror of https://github.com/astral-sh/ruff
Use backticks for pep8-naming messages
This commit is contained in:
parent
c55fd76743
commit
e79766d5ec
10
README.md
10
README.md
|
|
@ -341,11 +341,11 @@ Flake8.
|
||||||
|
|
||||||
| Code | Name | Message |
|
| Code | Name | Message |
|
||||||
| ---- | ---- | ------- |
|
| ---- | ---- | ------- |
|
||||||
| N801 | InvalidClassName | class name '...' should use CapWords convention |
|
| N801 | InvalidClassName | class name `...` should use CapWords convention |
|
||||||
| N802 | InvalidFunctionName | function name '...' should be lowercase |
|
| N802 | InvalidFunctionName | function name `...` should be lowercase |
|
||||||
| N803 | InvalidArgumentName | argument name '...' should be lowercase |
|
| N803 | InvalidArgumentName | argument name `...` should be lowercase |
|
||||||
| N804 | InvalidFirstArgumentNameForClassMethod | first argument of a classmethod should be named 'cls' |
|
| N804 | InvalidFirstArgumentNameForClassMethod | first argument of a classmethod should be named `cls` |
|
||||||
| N805 | InvalidFirstArgumentNameForMethod | first argument of a method should be named 'self' |
|
| N805 | InvalidFirstArgumentNameForMethod | first argument of a method should be named `self` |
|
||||||
|
|
||||||
### flake8-comprehensions
|
### flake8-comprehensions
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1213,19 +1213,19 @@ impl CheckKind {
|
||||||
CheckKind::NoOverIndentation => "Docstring is over-indented".to_string(),
|
CheckKind::NoOverIndentation => "Docstring is over-indented".to_string(),
|
||||||
// pep8-naming
|
// pep8-naming
|
||||||
CheckKind::InvalidClassName(name) => {
|
CheckKind::InvalidClassName(name) => {
|
||||||
format!("class name '{name}' should use CapWords convention ")
|
format!("class name `{name}` should use CapWords convention ")
|
||||||
}
|
}
|
||||||
CheckKind::InvalidFunctionName(name) => {
|
CheckKind::InvalidFunctionName(name) => {
|
||||||
format!("function name '{name}' should be lowercase")
|
format!("function name `{name}` should be lowercase")
|
||||||
}
|
}
|
||||||
CheckKind::InvalidArgumentName(name) => {
|
CheckKind::InvalidArgumentName(name) => {
|
||||||
format!("argument name '{name}' should be lowercase")
|
format!("argument name `{name}` should be lowercase")
|
||||||
}
|
}
|
||||||
CheckKind::InvalidFirstArgumentNameForClassMethod => {
|
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 => {
|
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
|
// Meta
|
||||||
CheckKind::UnusedNOQA(codes) => match codes {
|
CheckKind::UnusedNOQA(codes) => match codes {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue