docstring formatting style "nil" is not like regular string

Bug #1477422 reported by holger (lp)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

With the change in revision 1994 of file python-mode.el the strings are now formatted (M-q, fill-paragraph) without an additional newline. This is good. But if py-docstring-style is set to nil, then docstrings still get that additional newline. So either the documentation is wrong, or the code is wrong. The documentation of py-docstring-style reads:

"A value of NIL won't care about quotes position and will treat docstrings a normal string"

Example:

class MyClass(object):
    """fff"""

    def my_method(self):
        """Some long line with more than 70 characters in the docstring. Some more text."""

       abcdefghijkl = """Some long line with more than 70 characters in the docstring. Some more text."""

This is formatted as (py-docstring-fill-column set to 70):

class MyClass(object):
    """fff"""

    def my_method(self):
        """Some long line with more than 70 characters in the

        docstring. Some more text."""

        abcdefghijkl = """Some long line with more than 70 characters
        in the docstring. Some more text."""

BTW, without a newline between the docstring and variable abcdefghijkl the formatting doesn't work at all if you start to format the string of the variable.

Changed in python-mode:
importance: Undecided → Medium
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.2.1
Changed in python-mode:
status: New → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.