Menu

#1042 Word wrap docstrings with @stuff

open
Editor (491)
5
2010-01-06
2010-01-06
No

Word wrapping docstrings like:
"""
@param bits: Emphasis bits in MPEG header. Blaa blaa blaa blaa blaa blaa blaa blaa blaa
@type bits: int
"""

with Ctrl+2, w yields:

"""
@param bits: Emphasis bits in MPEG header. Blaa blaa blaa blaa blaa blaa
blaa blaa blaa @type bits: int
"""

I didn't expect that, what I expected was:

Expected 1:
"""
@param bits: Emphasis bits in MPEG header. Blaa blaa blaa blaa blaa blaa
blaa blaa blaa
@type bits: int
"""

Note also that EpyDoc for one *requires* to wrap long @stuff texts, and second paragraphs like this:
(See http://epydoc.sourceforge.net/manual-epytext.html#fields )

Expected 2:
"""
@keyword reset_offset: Resets the offset of seeking between chunks. Used
to correct the cursor position when file seeks / reads occurs inside
chunk iteration.

Second paragraph of reset_offset blaa blaa...
@type reset_offset: bool
"""

I would prefer the Expected 2. (above) since it would work for second paragraphs, but if thats a too big fix I'd like to see the Expected 1 implemented at least.

Thanks.

Discussion

  • Jari Pennanen

    Jari Pennanen - 2010-01-06

    Oh damned, the sourceforge of course wrapped my examples.

     
  • Jari Pennanen

    Jari Pennanen - 2010-01-06

    Non wrapped body examples.

     
  • Jari Pennanen

    Jari Pennanen - 2010-01-06

    I added a attachment which includes the same text as above without word wrapping by sourceforge.

     
  • Jari Pennanen

    Jari Pennanen - 2010-01-09

    This also applies to sphinx documentation, with difference that @ is replaced with two dots, e.g:

    """

    .. note:: porta molestie eget non lacus. Phasellus
    quis risus in dui hendrerit varius. Quisque
    sagittis lobortis ultricies. Proin et tellus sed
    quam mattis tempor.

    In mattis, ante et facilisis sollicitudin, urna
    est molestie dui, eu egestas nisl ligula quis
    ligula. Sed tincidunt placerat diam, ut
    facilisis dolor aliquet at.

    In vitae neque sit amet dolor elementum
    lobortis. Quisque at velit vitae nisl posuere
    facilisis sed et mauris.

    .. note:: some stuff.
    """

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.