-
Notifications
You must be signed in to change notification settings - Fork 765
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
Automatic docstring word wrapping #3794
Comments
Granted that's not specific to doc strings. It applies to everything. |
Hi, thanks for answering. But it's not really solving it, as this only wraps the view of the line, but the line is actually long, and pylint complains (and is imho right) about it. So I was looking for something that splits and indents the line, so that the file content remains according to PEP standard - like other things get corrected with the "Format Selection" feature (which btw. leaves such long line comments in peace). However, I must say, by writing the documentation with word-wrap enabled in connected paragraphs, it is then already much easier to just insert the line feeds when done. |
Anything on this? It'd be really helpful for when you're mass editing docstrings, to have those longer lines automatically folded to the correct length. I have tried extensions for this, but they seem to always struggle with lists, and code blocks |
No, sorry it's not something we have on our backlog. I recommend adding an enhancement request to the discussions so people can up vote it. |
My experience with VS Code and pylance so far is: If I miss a feature, it's just because I didn't find it yet. I assume the same to be the case here, that's why I'd like to ask carefully:
When writing docstrings (for using sphinx/autodoc), I would like the text to wrap lines and indent automatically for connected pieces of text. Ideally even, when editing the text, it should re-arrange the lines to avoid too long or unnecessarily short lines.
.. should be converted to ..
And, then, when I edit the comment:
![image](https://user-images.githubusercontent.com/41128870/210071616-a4aec177-3d87-4cdf-95da-e3ae9891a78f.png)
![image](https://user-images.githubusercontent.com/41128870/210071669-81149974-6386-4717-8a65-bf2089ba7dd2.png)
... it should ideally rearrange it as follows:
Does this functionality already exist 😄 ?
The text was updated successfully, but these errors were encountered: