Repository navigation
docstring_parser: unescape names in every style - #188
Merged
Merged
Conversation
Only ReST dropped the backslashes escaping markup in a name, as in \*\*kwargs or class\_. Google, Numpydoc and Epydoc now do too, and Epydoc no longer fails on @PARAM \*\*kwargs. ReST also unescapes type fields and attribute directives, and escapes a name's trailing underscore on compose, which docutils reads as a reference. Google and Numpydoc read "..." as one of several names, as napoleon does, so "arg1, arg2, ..." gives three params.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Covers these items from the BEHAVIOR.md review for #136.
\*\*kwargsreads as**kwargsandclass\_asclass_. Only ReST did this before. Epydoc used to raiseParseErroron@param \*\*kwargs:.:type:/:vartype:values, inline types and.. attribute::names and types._is writtenclass\_, because docutils would readclass_as a reference.a_bstays as it is....as one of several names, as sphinx.ext.napoleon does, soarg1, arg2, ...gives three params.Args:line of bare names (x, y) is now tested.Case diffs: one file,
scipy.stats._distn_infrastructure.rv_discrete.logsf. Itsarg1, arg2, arg3,...is now four params:arg1,arg2,arg3and....Parity against origin/main: 5 of 29184 docstrings differ (case 5, stdlib 0, generated 0). One is the parse change above. The other four are ReST compose output that now escapes names such as
from_.