summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Fine <ubuntu@ip-172-31-89-59.ec2.internal>2021-04-09 17:30:44 +0000
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-10 08:36:29 +0200
commit316fc0dcbb37d8072df82aaa90048f5ad43e4ce3 (patch)
tree98ef4c95664cbfdb5d758e751bbdd1a293dae98e
parenta9bb2ad5e8f00e960be7d7faa7794a8297752a82 (diff)
downloadpylint-git-316fc0dcbb37d8072df82aaa90048f5ad43e4ce3.tar.gz
fixing comments to break into multiple lines
-rw-r--r--pylint/checkers/spelling.py2
-rw-r--r--tests/checkers/unittest_spelling.py16
2 files changed, 12 insertions, 6 deletions
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py
index a1a9f6825..41e53afbe 100644
--- a/pylint/checkers/spelling.py
+++ b/pylint/checkers/spelling.py
@@ -278,7 +278,7 @@ class SpellingChecker(BaseTokenChecker):
"default": "fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:",
"type": "string",
"metavar": "<comma separated words>",
- "help": "List of comma separated words that should not be considered directives if they appear and the beginning of a comment and should not be checked.",
+ "help": "List of comma separated words that should be considered directives if they appear and the beginning of a comment and should not be checked.",
},
),
)
diff --git a/tests/checkers/unittest_spelling.py b/tests/checkers/unittest_spelling.py
index d5011dba0..2d48670cb 100644
--- a/tests/checkers/unittest_spelling.py
+++ b/tests/checkers/unittest_spelling.py
@@ -37,9 +37,9 @@ if enchant is not None:
pass
-class TestSpellingChecker(
- CheckerTestCase
-): # pylint:disable=too-many-public-methods # This is a test case class, not sure why it would be relevant to have this pylint rule enforced for test case classes
+class TestSpellingChecker(CheckerTestCase): # pylint:disable=too-many-public-methods
+ # This is a test case class, not sure why it would be relevant to have
+ # this pylint rule enforced for test case classes.
CHECKER_CLASS = spelling.SpellingChecker
skip_on_missing_package_or_dict = pytest.mark.skipif(
@@ -325,8 +325,14 @@ class TestSpellingChecker(
("mypy", ":", "mypy directive"),
),
)
- def test_skip_tool_directives_at_beginning_of_comments_but_still_raise_error_if_directive_appears_later_in_comment( # pylint:disable=unused-argument # Having the extra description parameter allows the description to show up in the pytest output as part of the test name when running parametrized tests
- self, misspelled_portion_of_directive, second_portion_of_directive, description
+ def test_skip_tool_directives_at_beginning_of_comments_but_still_raise_error_if_directive_appears_later_in_comment( # pylint:disable=unused-argument
+ # Having the extra description parameter allows the description
+ # to show up in the pytest output as part of the test name
+ # when running parametrized tests.
+ self,
+ misspelled_portion_of_directive,
+ second_portion_of_directive,
+ description,
):
full_comment = f"# {misspelled_portion_of_directive}{second_portion_of_directive} {misspelled_portion_of_directive}"
with self.assertAddsMessages(