0

I am using python-docstring-fill (function of https://github.com/glyph/python-docstring-mode) to wrap Python docstrings. I observe that it does not align based the Python-way. It should be as:

"""Do this

Exaplain...
Exaplain...
"""

Example (the correct way):

def sacct_result(self):
    """Return sacct output for the job.

    Do this...
    Do that...
    """

M-q (python-docstring-fill) converts into, where it adds spaces before closing """:

def sacct_result(self):
    """Return sacct output for the job.

      Do this...  Do that...
        """

How can I prevent this wrong wrapping from happening? or just disable wrapping in the docstrings since it does it wrongly.

Could be related to: In emacs Python mode, how do I set a different auto-fill width for docstrings and code?

1

1 Answer 1

1

As @nega refers following issue solves the problem I was having: Broken formatting with new python.el (0.28).

The Fix and the patch that solves it could be seen here: https://github.com/glyph/python-docstring-mode/commit/0dbc133cc9f207a448e59f3849c5e3ca51da7bd6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.