Skip to content
#

docstrings

Here are 35 public repositories matching this topic...

plinss
plinss commented Feb 3, 2020

pdoc3 currently doesn't generate documentation for instance variables unless they have docstrings. It would be very useful to have a rule that enforced the presence of docstrings for instance variables.

e.g.:

class Test:
    def __init__(self, value):
        self.value = value
        """This is a value."""
pawamoy
pawamoy commented Apr 13, 2020

From #82.

Instead of a warning we could simply add a debug log with the path to the used template using its filename attribute, though with the current code each handler must do it.

Also we have no control within the Jinja rendering: when we {% include "template.html" %} we can't even issue a debug log to tell which one was picked up, so I'm not sure about the usefulness of just logging

asetGem
asetGem commented May 20, 2019

When the first version of a function takes some parameters, it generates the right docstring, that we just have to complete.
However, if we change the function by adding/removing parameter(s), and adding/removing a return, the docstring is not automatically updated.
The only solutions I found are:

  • either complete by myself, following the format generated
    Problem: must know the format ru
pawamoy
pawamoy commented Apr 25, 2020

Example:

"""
Args:
    obj: instance of [HelloWorld][1].

Some text.

[1]: https://url.to.helloworld/documentation
"""

This will not work because obj's description is isolated from the rest in the structured data, so the [1] is not available when mkdocstrings renders it, meaning the link will not be rendered.

Maybe we could parse such refs ([1], [link id], e

Improve this page

Add a description, image, and links to the docstrings topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the docstrings topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.