Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit ab65c6b

Browse files
authored
Merge branch 'master' into indent
2 parents eb8d312 + 75dabda commit ab65c6b

File tree

5 files changed

+37
-5
lines changed

5 files changed

+37
-5
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Run
5555
Links
5656
-----
5757

58-
* `Read the full documentation here <http://pydocstyle.org>`_.
58+
* `Read the full documentation here <http://pydocstyle.org/en/stable/>`_.
5959

6060
* `Fork pydocstyle on GitHub <http://github.com/PyCQA/pydocstyle>`_.
6161

docs/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Bug Fixes
1616
* Update convention support documentation (#386, #393)
1717
* Detect inner asynchronous functions for D202 (#467)
1818
* Fix indentation error while parsing class methods (#441).
19+
* Fix a bug in parsing Google-style argument description.
20+
The bug caused some argument names to go unreported in D417 (#448).
1921

2022

2123
5.0.2 - January 8th, 2020

src/pydocstyle/checker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ class ConventionChecker:
9696
r"(\w+)" # Followed by 1 or more unicode chars, numbers or underscores
9797
# The above is captured as the first group as this is the paramater name.
9898
r"\s*" # Followed by 0 or more whitespace characters
99-
r"\(?(.*?)\)?" # Matches patterns contained within round brackets.
100-
# The `(.*?)` is the second capturing group which matches any sequence of
101-
# characters in a non-greedy way (denoted by the `*?`)
99+
r"(\(.*?\))?" # Matches patterns contained within round brackets.
100+
# The `.*?`matches any sequence of characters in a non-greedy
101+
# way (denoted by the `*?`)
102102
r"\s*" # Followed by 0 or more whitespace chars
103103
r":" # Followed by a colon
104104
".+" # Followed by 1 or more characters - which is the docstring for the parameter

src/pydocstyle/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def _expand_error_codes(code_parts):
463463
'known errors: %s', part)
464464
expanded_codes.update(codes_to_add)
465465
except TypeError as e:
466-
raise IllegalConfiguration(e)
466+
raise IllegalConfiguration(e) from e
467467

468468
return expanded_codes
469469

src/tests/test_cases/sections.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,36 @@ def test_missing_args_static_method(a, x, y, _test, z=3): # noqa: D213, D407
354354
355355
"""
356356

357+
@staticmethod
358+
@expect("D417: Missing argument descriptions in the docstring "
359+
"(argument(s) a, b are missing descriptions in "
360+
"'test_missing_docstring' docstring)", arg_count=2)
361+
def test_missing_docstring(a, b): # noqa: D213, D407
362+
"""Test a valid args section.
363+
364+
Args:
365+
a:
366+
367+
"""
368+
369+
@staticmethod
370+
@expect("D417: Missing argument descriptions in the docstring "
371+
"(argument(s) skip, verbose are missing descriptions in "
372+
"'test_missing_docstring_another' docstring)", arg_count=2)
373+
def test_missing_docstring_another(skip, verbose): # noqa: D213, D407
374+
"""Do stuff.
375+
376+
Args:
377+
skip (:attr:`.Skip`):
378+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
379+
Etiam at tellus a tellus faucibus maximus. Curabitur tellus
380+
mauris, semper id vehicula ac, feugiat ut tortor.
381+
verbose (bool):
382+
If True, print out as much infromation as possible.
383+
If False, print out concise "one-liner" information.
384+
385+
"""
386+
357387

358388
@expect(_D213)
359389
@expect("D417: Missing argument descriptions in the docstring "

0 commit comments

Comments
 (0)