Skip to content
New issue

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

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

Already on GitHub? # to your account

Automatic wrapping and force wrapping issues #68

Closed
thebuzzstop opened this issue Jan 15, 2021 · 1 comment · Fixed by #201
Closed

Automatic wrapping and force wrapping issues #68

thebuzzstop opened this issue Jan 15, 2021 · 1 comment · Fixed by #201
Labels
C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) P: enhancement Feature that is outside the scope of PEP 257
Milestone

Comments

@thebuzzstop
Copy link

Long descriptions are not being wrapped as expected.

When I use the --force-wrap option the entire docstring is properly wrapped but a Sphinx param is also wrapped which is undesirable.

Usage:

  • docformatter v1.4 inside PyCharm
  • invoked as an external tool with the following command line
  • docformatter --force-wrap --wrap-descriptions 72 --wrap-summaries 79 --in-place --range 1014 1019 myfile.py

Here's a screenshot of the before:
image

Here's a screenshot after running docformatter:
image
Note that the description was not line-wrapped.

Here's a screenshot after running docformatter with the --force-wrap option:
image
Note that the description was line-wrapped but the Sphinx param was also wrapped.

@weibullguy weibullguy added the P: enhancement Feature that is outside the scope of PEP 257 label Jul 24, 2022
@weibullguy
Copy link
Member

docformatter's goal is to reformat docstrings in accordance with PEP-257. Sphinx directives are not really addressed by PEP-257. That said, Sphinx directives are ubiquitous in docstrings and docformatter should handle them properly. See also #78

# for free to join this conversation on GitHub. Already have an account? # 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants