Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LazyDocs - Generated *.md files do not represent bullet list

I hope I am right here in this channel/tag.

I am using lazydocs for automatic generation of my md files. My project is written in Python 3.7.5.

I do have some bullet lists in my docstrings. According to this example I need to leave a blank line, then 4 spaces and e.g. "-" follows, end of bullet list another blank line.

Here an example:

"""This is my example docstring

A simple bullet list:

    - point 1
    - point 2
    - point 3

"""

But when I generate my md file using lazydocs the md file looks like:

This is my example docstring

A simple bullet list:

    - point 1    - point 2    - point 3

I would expect my md file to look like

This is my example docstring

A simple bullet list:

    - point 1
    - point 2
    - point 3

Then I tried a bit around. I found out that leaving a blank line between the bullet items makes lazydocs generate my md5 file in the expected format. That would look like this:

"""This is my example docstring

A simple bullet list:

    - point 1

    - point 2

    - point 3

"""

But inserting blank lines into my code is not a nice way to document my code I guess :)

So my question:

Am I doing something wrong here or is lazydocs not processing the bullet points correctly?

Thanks a lot for any help here!

like image 951
o0minni0o Avatar asked Sep 06 '25 16:09

o0minni0o


1 Answers

We just released a new version of lazydocs (0.4.4) with support for bullet lists. You can upgrade via:

pip install --upgrade lazydocs

The correct way of using bullet lists in this version of lazydocs would be without indentation:

"""This is my example docstring

A simple bullet list:

- point 1
- point 2
- point 3

"""
like image 146
Lukas Masuch Avatar answered Sep 09 '25 13:09

Lukas Masuch