Capitalize pep8-naming messages

This commit is contained in:
Charlie Marsh 2022-10-16 17:58:26 -04:00
parent 56f69ce71e
commit bd4394aa89
2 changed files with 11 additions and 10 deletions

View file

@ -341,11 +341,11 @@ Flake8.
| Code | Name | Message |
| ---- | ---- | ------- |
| N801 | InvalidClassName | class name `...` should use CapWords convention |
| N802 | InvalidFunctionName | function name `...` should be lowercase |
| N803 | InvalidArgumentName | argument name `...` should be lowercase |
| N804 | InvalidFirstArgumentNameForClassMethod | first argument of a classmethod should be named `cls` |
| N805 | InvalidFirstArgumentNameForMethod | first argument of a method should be named `self` |
| N801 | InvalidClassName | Class name `...` should use CapWords convention |
| N802 | InvalidFunctionName | Function name `...` should be lowercase |
| N803 | InvalidArgumentName | Argument name `...` should be lowercase |
| N804 | InvalidFirstArgumentNameForClassMethod | First argument of a class method should be named `cls` |
| N805 | InvalidFirstArgumentNameForMethod | First argument of a method should be named `self` |
### flake8-comprehensions
@ -397,6 +397,7 @@ Flake8.
| ---- | ---- | ------- |
| M001 | UnusedNOQA | Unused `noqa` directive |
## Editor Integrations
### PyCharm

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 class method 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 {