docstring formatting style "nil" is not like regular string
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-
class MyClass(object):
"""fff"""
def my_method(self):
"""Some long line with more than 70 characters in the
docstring. Some more text."""
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 |