-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and refactors for
docparams
extension (#7398)
* Fix and refactors for ``docparams`` extension The ``re_only_desc`` regex did not match for white and characters after ``\n``, so some description-only lines weren't getting matched. In addition, lookaheads were added to ``re_param_line`` (i.e. make sure the type group is not followed by a new line (``\n``)). Lastly, named groups (ala Perl regular expressions) were added for slightly improved clarity. Co-authored-by: Hendry, Adam <[email protected]>
- Loading branch information
1 parent
e63a352
commit de613c2
Showing
5 changed files
with
53 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
The ``docparams`` extension now considers typing in Numpy style docstrings | ||
as "documentation" for the ``missing-param-doc`` message. | ||
|
||
Refs #7398 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
missing-any-param-doc:3:0:3:11:foobar1:"Missing any documentation in ""foobar1""":HIGH | ||
missing-any-param-doc:8:0:8:11:foobar2:"Missing any documentation in ""foobar2""":HIGH | ||
missing-param-doc:15:0:15:11:foobar3:"""arg1, arg2, arg3"" missing in parameter documentation":HIGH | ||
missing-param-doc:15:0:15:11:foobar3:"""arg2"" missing in parameter documentation":HIGH | ||
missing-type-doc:15:0:15:11:foobar3:"""arg2"" missing in parameter type documentation":HIGH | ||
missing-param-doc:24:0:24:11:foobar4:"""arg2"" missing in parameter documentation":HIGH | ||
missing-type-doc:24:0:24:11:foobar4:"""arg2"" missing in parameter type documentation":HIGH | ||
missing-param-doc:33:0:33:11:foobar5:"""arg2"" missing in parameter documentation":HIGH | ||
missing-type-doc:33:0:33:11:foobar5:"""arg1"" missing in parameter type documentation":HIGH | ||
missing-param-doc:43:0:43:11:foobar6:"""arg2, arg3"" missing in parameter documentation":HIGH | ||
missing-param-doc:43:0:43:11:foobar6:"""arg3"" missing in parameter documentation":HIGH | ||
missing-type-doc:43:0:43:11:foobar6:"""arg3"" missing in parameter type documentation":HIGH | ||
missing-any-param-doc:53:0:53:11:foobar7:"Missing any documentation in ""foobar7""":HIGH | ||
missing-any-param-doc:61:0:61:11:foobar8:"Missing any documentation in ""foobar8""":HIGH | ||
missing-param-doc:66:0:66:11:foobar9:"""arg1, arg2, arg3"" missing in parameter documentation":HIGH | ||
missing-param-doc:76:0:76:12:foobar10:"""arg2"" missing in parameter documentation":HIGH | ||
missing-type-doc:76:0:76:12:foobar10:"""arg1, arg3"" missing in parameter type documentation":HIGH | ||
missing-any-param-doc:88:0:88:12:foobar11:"Missing any documentation in ""foobar11""":HIGH | ||
missing-param-doc:97:0:97:12:foobar12:"""arg1, arg3"" missing in parameter documentation":HIGH | ||
missing-param-doc:97:0:97:12:foobar12:"""arg3"" missing in parameter documentation":HIGH | ||
missing-type-doc:97:0:97:12:foobar12:"""arg2, arg3"" missing in parameter type documentation":HIGH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters