diff options
author | Konstantina Saketou <56515303+ksaketou@users.noreply.github.com> | 2021-10-10 11:45:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-10 10:45:05 +0200 |
commit | f2b0c48536c008410e6c3eab51ea1042b96829e2 (patch) | |
tree | 3645b82be657071d49aff8567e833553890300a2 /tests/extensions | |
parent | 1eaf5aa211a16607a0f15cae56a90e94555f3809 (diff) | |
download | pylint-git-f2b0c48536c008410e6c3eab51ea1042b96829e2.tar.gz |
Properly identify undocumented parameters and add new message called missing-any-param-doc (#5097)
* Correctly identify parameters with no doc and add new message
This commit fixes the problem where non documented parameters where not being
identified properly. Also, it adds a new message called ``missing-any-param-doc`` for
when a function has no parameter and type doc at all.
Adds new test cases for the ``missing-param-doc`` and ``missing-type-doc`` messages
and tests for the new message ``missing-any-param-doc``.
* Replace old messages with the new one where needed
Fix pylint's code where the new message where needed in other files instead of
triggering both missing-param-doc and missing-type-doc.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/extensions')
-rw-r--r-- | tests/extensions/test_check_docs.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/extensions/test_check_docs.py b/tests/extensions/test_check_docs.py index 1c250bc9b..04919c27b 100644 --- a/tests/extensions/test_check_docs.py +++ b/tests/extensions/test_check_docs.py @@ -325,8 +325,7 @@ class TestParamDocChecker(CheckerTestCase): """ ) with self.assertAddsMessages( - MessageTest(msg_id="missing-param-doc", node=node, args=("x, y",)), - MessageTest(msg_id="missing-type-doc", node=node, args=("x, y",)), + MessageTest(msg_id="missing-any-param-doc", node=node, args=(node.name)), ): self.checker.visit_functiondef(node) |