Skip to content

Commit

Permalink
fixing comments to break into multiple lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli Fine authored and Pierre-Sassoulas committed Apr 10, 2021
1 parent a9bb2ad commit 316fc0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pylint/checkers/spelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
},
),
)
Expand Down
16 changes: 11 additions & 5 deletions tests/checkers/unittest_spelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
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(
Expand Down Expand Up @@ -325,8 +325,14 @@ def test_skip_sphinx_directives_2(self):
("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(
Expand Down

0 comments on commit 316fc0d

Please sign in to comment.