Repository navigation
docstring_parser: part lead text from the summary - #194
Merged
Merged
Conversation
Numpydoc moves indented text before a section's first item to the long description. Right after a summary with no blank line, it kept blank_after_short_description False, so the text composed straight under the summary and read back as part of it, in every section with items, such as Parameters, Attributes and Raises. Mark such text as a paragraph of its own whenever it is written right after the summary, that is, unless a leading deprecation goes between them, which keeps the summary's spacing as before.
append_loose imported leading_deprecation inside the function, as _directives imports _compose, which imports _text. The function needs only the common classes, so move it down to _text, where every module that uses it can import it at the top level.
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.
Numpydoc moves indented text before a section's first item into the long description. When that text came right after a summary with no blank line,
blank_after_short_descriptionstayed False, so compose wrote it straight under the summary and it read back as part of the summary. This affected every section with items: Parameters, Attributes, Other Parameters, Receives, Keyword Arguments, Returns, Yields, Raises and Warns.append_loosenow marks such text as a paragraph of its own whenever compose would write it right after the summary, that is, unless a leading deprecation goes between them. The existingdeprecation_keeps_blank_after_shortcases keep their spacing.just update-caseschanges nothing.blank_after_short_descriptionturning True plus the compose output that follows from it.