Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: wrap Sphinx style long parameter descriptions #201

Merged
merged 12 commits into from
May 15, 2023
Merged

Conversation

weibullguy
Copy link
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
7 checks passed
@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