Tweak messages for pep8-naming rules

This commit is contained in:
Charlie Marsh 2022-10-21 17:06:16 -04:00
parent c72b8e8d1e
commit f8dc208665
2 changed files with 12 additions and 12 deletions

View File

@ -348,12 +348,12 @@ The 🛠 emoji indicates that a rule is automatically fixable by the `--fix` com
| N803 | InvalidArgumentName | Argument name `...` should be lowercase | | | N803 | InvalidArgumentName | Argument name `...` should be lowercase | |
| N804 | InvalidFirstArgumentNameForClassMethod | First argument of a class method should be named `cls` | | | N804 | InvalidFirstArgumentNameForClassMethod | First argument of a class method 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` | |
| N807 | DunderFunctionName | function name should not start and end with '__' | | | N807 | DunderFunctionName | Function name should not start and end with `__` | |
| N811 | ConstantImportedAsNonConstant | constant '...' imported as non constant '...' | | | N811 | ConstantImportedAsNonConstant | Constant `...` imported as non-constant `...` | |
| N812 | LowercaseImportedAsNonLowercase | lowercase '...' imported as non lowercase '...' | | | N812 | LowercaseImportedAsNonLowercase | Lowercase `...` imported as non-lowercase `...` | |
| N813 | CamelcaseImportedAsLowercase | camelcase '...' imported as lowercase '...' | | | N813 | CamelcaseImportedAsLowercase | Camelcase `...` imported as lowercase `...` | |
| N814 | CamelcaseImportedAsConstant | camelcase '...' imported as constant '...' | | | N814 | CamelcaseImportedAsConstant | Camelcase `...` imported as constant `...` | |
| N817 | CamelcaseImportedAsAcronym | camelcase '...' imported as acronym '...' | | | N817 | CamelcaseImportedAsAcronym | Camelcase `...` imported as acronym `...` | |
### flake8-comprehensions ### flake8-comprehensions

View File

@ -1221,22 +1221,22 @@ impl CheckKind {
"First argument of a method should be named `self`".to_string() "First argument of a method should be named `self`".to_string()
} }
CheckKind::DunderFunctionName => { CheckKind::DunderFunctionName => {
"function name should not start and end with '__'".to_string() "Function name should not start and end with `__`".to_string()
} }
CheckKind::ConstantImportedAsNonConstant(name, asname) => { CheckKind::ConstantImportedAsNonConstant(name, asname) => {
format!("constant '{name}' imported as non constant '{asname}'") format!("Constant `{name}` imported as non-constant `{asname}`")
} }
CheckKind::LowercaseImportedAsNonLowercase(name, asname) => { CheckKind::LowercaseImportedAsNonLowercase(name, asname) => {
format!("lowercase '{name}' imported as non lowercase '{asname}'") format!("Lowercase `{name}` imported as non-lowercase `{asname}`")
} }
CheckKind::CamelcaseImportedAsLowercase(name, asname) => { CheckKind::CamelcaseImportedAsLowercase(name, asname) => {
format!("camelcase '{name}' imported as lowercase '{asname}'") format!("Camelcase `{name}` imported as lowercase `{asname}`")
} }
CheckKind::CamelcaseImportedAsConstant(name, asname) => { CheckKind::CamelcaseImportedAsConstant(name, asname) => {
format!("camelcase '{name}' imported as constant '{asname}'") format!("Camelcase `{name}` imported as constant `{asname}`")
} }
CheckKind::CamelcaseImportedAsAcronym(name, asname) => { CheckKind::CamelcaseImportedAsAcronym(name, asname) => {
format!("camelcase '{name}' imported as acronym '{asname}'") format!("Camelcase `{name}` imported as acronym `{asname}`")
} }
// Meta // Meta
CheckKind::UnusedNOQA(codes) => match codes { CheckKind::UnusedNOQA(codes) => match codes {