summaryrefslogtreecommitdiff
path: root/pylint/extensions/_check_docs_utils.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-10-18 22:01:27 +0200
committerGitHub <noreply@github.com>2021-10-18 22:01:27 +0200
commitcd5838c14c58d6904433e9037ec20071eb897185 (patch)
treea98e02ad107915e1a6db624c784e99ecbecdcf00 /pylint/extensions/_check_docs_utils.py
parent1daee40d6f1cf3d379396dc272c123d987ad4cdd (diff)
downloadpylint-git-cd5838c14c58d6904433e9037ec20071eb897185.tar.gz
Fix asterisks parsing of ``mising-param-doc`` (#5175)
Closes #3733
Diffstat (limited to 'pylint/extensions/_check_docs_utils.py')
-rw-r--r--pylint/extensions/_check_docs_utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pylint/extensions/_check_docs_utils.py b/pylint/extensions/_check_docs_utils.py
index e1a7301e0..52f9e470c 100644
--- a/pylint/extensions/_check_docs_utils.py
+++ b/pylint/extensions/_check_docs_utils.py
@@ -279,7 +279,7 @@ class SphinxDocstring(Docstring):
\s+
)?
- (\w+) # Parameter name
+ (\*{{0,2}}\w+) # Parameter name with potential asterisks
\s* # whitespace
: # final colon
"""
@@ -472,7 +472,7 @@ class GoogleDocstring(Docstring):
re_param_line = re.compile(
fr"""
- \s* \*{{0,2}}(\w+) # identifier potentially with asterisks
+ \s* (\*{{0,2}}\w+) # identifier potentially with asterisks
\s* ( [(]
{re_multiple_type}
(?:,\s+optional)?
@@ -731,7 +731,7 @@ class NumpyDocstring(GoogleDocstring):
re_param_line = re.compile(
fr"""
- \s* (\w+) # identifier
+ \s* (\*{{0,2}}\w+) # identifier with potential asterisks
\s* :
\s* (?:({GoogleDocstring.re_multiple_type})(?:,\s+optional)?)? # optional type declaration
\s* (.*) # optional description