Skip to content

feat: wrap Sphinx style long parameter descriptions#201

Merged
weibullguy merged 12 commits intomasterfrom
feat/issue_58
May 15, 2023
Merged

feat: wrap Sphinx style long parameter descriptions#201
weibullguy merged 12 commits intomasterfrom
feat/issue_58

Conversation

@weibullguy
Copy link
Copy Markdown
Member

@weibullguy weibullguy commented May 2, 2023

Adds new argument --style to direct docformatter to wrap long parameter descriptions that exceed wrap length. Only "Sphinx" style parameter lists are recognized. NumPy and Google style parameter lists still result in existing behavior of not wrapping the long description (this PR sets the framework to add those styles).

Sphinx style parameter lists are in the format:

:param str arg1: A string argument.
:param int arg2: An integer argument.
:return something_good: The return value.
:rtype: bool

This PR will be merged following release of v1.7.0.

Closes #58
Closes #68

@weibullguy weibullguy added P: enhancement Feature that is outside the scope of PEP 257 C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) labels May 2, 2023
@weibullguy weibullguy marked this pull request as ready for review May 15, 2023 17:20
@weibullguy weibullguy merged commit cb7bf8d into master May 15, 2023
@weibullguy weibullguy deleted the feat/issue_58 branch May 15, 2023 17:22
@weibullguy weibullguy added the S: merged Closed with work merged to repository label Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) P: enhancement Feature that is outside the scope of PEP 257 S: merged Closed with work merged to repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic wrapping and force wrapping issues wrap long :param and :return lines

1 participant