From e79766d5ec60ffd6fffe9bc47bd126d59ee7741e Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 16 Oct 2022 12:09:07 -0400 Subject: [PATCH] Use backticks for pep8-naming messages --- README.md | 10 +++++----- src/checks.rs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d25981cd44..68cf4ab63a 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 classmethod should be named `cls` | +| N805 | InvalidFirstArgumentNameForMethod | first argument of a method should be named `self` | ### flake8-comprehensions diff --git a/src/checks.rs b/src/checks.rs index e38bbdf842..aa8b6a3227 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 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 {