diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-10-31 00:33:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-31 00:33:23 +0200 |
commit | 1d3a7ff32b0f6d819b17ce18345502fbc47b48c9 (patch) | |
tree | b3c40c9636f2a816ee61af043700c7c6a1b53a88 /tests/extensions/test_check_docs.py | |
parent | 76a7553066130a7dbf4d10922b2530161b2ec5b0 (diff) | |
download | pylint-git-1d3a7ff32b0f6d819b17ce18345502fbc47b48c9.tar.gz |
Allow no type in Numpy param docstrings for ``mising-param-doc`` (#5231)
This closes #5222
See https://numpydoc.readthedocs.io/en/latest/format.html#parameters for reference
Diffstat (limited to 'tests/extensions/test_check_docs.py')
-rw-r--r-- | tests/extensions/test_check_docs.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/extensions/test_check_docs.py b/tests/extensions/test_check_docs.py index 79836c21a..5fdbc0ee3 100644 --- a/tests/extensions/test_check_docs.py +++ b/tests/extensions/test_check_docs.py @@ -1338,13 +1338,17 @@ class TestParamDocChecker(CheckerTestCase): def test_finds_args_without_type_numpy(self) -> None: node = astroid.extract_node( ''' - def my_func(named_arg, *args): + def my_func(named_arg, typed_arg: bool, untyped_arg, *args): """The docstring Args ---- named_arg : object Returned + typed_arg + Other argument without numpy type annotation + untyped_arg + Other argument without any type annotation *args : Optional Arguments @@ -1357,7 +1361,9 @@ class TestParamDocChecker(CheckerTestCase): return named_arg ''' ) - with self.assertNoMessages(): + with self.assertAddsMessages( + MessageTest(msg_id="missing-type-doc", node=node, args=("untyped_arg",)) + ): self.checker.visit_functiondef(node) def test_finds_args_with_xref_type_google(self) -> None: |