Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting the variables contained within a function not working or unclear #403

Open
NLee-NREL opened this issue Jun 9, 2022 · 1 comment
Labels
wontfix This will not be worked on

Comments

@NLee-NREL
Copy link

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

  1. script a function
  2. add a variable with docstring following
  3. run pdoc

Additional info

  • pdoc version: latest
@kernc
Copy link
Member

kernc commented Jun 9, 2022

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.

@kernc kernc added the wontfix This will not be worked on label Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Development

No branches or pull requests

2 participants