PyCharm has a great Fill Paragraph command, the only problem is that it wraps to the right margin setting. The problem with this is that it doesn't follow PEP8. I want to set my right margin to 79 to follow PEP8, but I want my comment blocks to be 72 characters, as PEP8 specifies. When I run the Fill Paragraph command I want it to wrap to 72 characters, not to 79. If it's not possible to do in PyCharm then I'll probably just not follow PEP8 this strictly; it's not worth taking the time to manually fix up the line length of comments in my opinion, 79 will have to do.
References:
http://legacy.python.org/dev/peps/pep-0008/
I found feature-request about it: https://youtrack.jetbrains.com/issue/PY-15700 in PyCharm bug tracker. You need to vote for it to increase its priority and be notified about updates.
Check out this plugin:
https://github.com/abrookins/WrapToColumn
This allows you to set a custom line-width for wrapping. So setting that to 72 and running the wrapper on the docstring works quite nicely!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With