From bd4394aa89a96dd5eb27ced49d9f7eb33915330a Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 16 Oct 2022 17:58:26 -0400 Subject: [PATCH] Capitalize pep8-naming messages --- README.md | 11 ++++++----- src/checks.rs | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f6f0448fdb..458c549a41 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/checks.rs b/src/checks.rs index aa8b6a3227..b561c65d9b 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -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 {