Documenting the variables contained within a function not working or unclear
Expected Behavior
I am trying to build documentation that would show the function and the variables contained in that function in the rendered documentation.
so with this function `def batteries():
"""This function blah blah
Args:
None
Returns:
list of returns...
"""
batt_format = pd.read_csv('batt_plant_char_format_v3.csv')
"""read in battery technology format types"""
`
I would like the documentation to include
def batteries() description
batt_format = ...
description
Actual Behavior
however, my documentation only shows the functions, not the variables contained.
def batteries() description
Steps to Reproduce
- script a function
- add a variable with docstring following
- run pdoc
Additional info
- pdoc version: latest
Unless the function is some class' __init__ constructor and the variables are attributes set upon self (effectively becoming documented instance variables), this doesn't nor is it customary to work. Function-local variables are implementation details that don't need to be exposed in the docs, yet, with PEP-224 comments, they are still documented for the implementer reading the source.