docstrings
Here are 35 public repositories matching this topic...
We had a function that pydoc documented:
def cfg_get_env(env=os.environ):
Except 'pydoc' did not document 'env=os.environ' but expanded the content of 'os.environ' which is a security issue.
Example:
def method(self):
"""Short description
@returns: some return val
"""
pass
Gets converted to:
def method(self):
"""Short description
Returns:
s: some return val
"""
pass
Expected Behavior
A way to include the --http mode's "Python module list" index.html as the root index.html of the --html output.
Actual Behavior
By default, there is no index.html at the top level of the HTML output. There doesn't seem to be a way to enabl
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
-
Updated
Jul 13, 2020 - Python
sphinx.ext.doctest lets you write doctests in your prose documentation (e.g. .rst files), which is really useful for ensuring that usage examples in those docs do in fact still work.
If it's possible to use xdoctest instead of the standard library doctest, that would be lovely - and could do with documentation. If not,
A common-ish mistake for docstring author is to use the label of a parameter as opposed to the actual name. The error message in this scenario could be improved. Right now the parameter docstring is reported as missing. It could be something like "Parameter label (X) is used instead of name (Y)".
Update docstring
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
-
Updated
Jun 3, 2017
-
Updated
Apr 9, 2018 - Python
-
Updated
Jun 15, 2018
-
Updated
Jul 14, 2016 - Python
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
-
Updated
Dec 7, 2017 - TypeScript
-
Updated
Oct 10, 2019 - Python
-
Updated
Mar 22, 2020 - Python
-
Updated
Jun 5, 2020 - Python
-
Updated
Jun 10, 2020 - Python
-
Updated
Sep 5, 2015 - Python
-
Updated
Apr 17, 2020 - Python
-
Updated
Oct 22, 2019 - Python
-
Updated
Jul 11, 2020 - Python
-
Updated
Sep 22, 2018 - Shell
-
Updated
Mar 31, 2017 - Python
-
Updated
Feb 21, 2018 - Python
-
Updated
Mar 31, 2017 - Python
Improve this page
Add a description, image, and links to the docstrings topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the docstrings topic, visit your repo's landing page and select "manage topics."
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.: