A year later and the project continues and I am still trying to get the 
documentation right. And having another issue with variables ( #: ).

Within module fan I have Class Run. Within class Run I have declared and 
documented #: some constants. This is good and they show up in the Sphinx 
output.  Also within Class Run is a function _main() and in _main() is 
declared a constant/variable _yellow of type dict.

The bad news is that #: documentation for this constant and how it is used, 
locally withing function _main(), does not appear in the sphinx/autodoc 
output. I have tried 1) #: documentation before the constant, 2) #: inline 
following the constant, 3) docstring on the line following the constant.  
None of these appear in the the html output.

My python code looks like the #: example following.  
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-autodata
  
I have tried adding a #: to the __init__ like the example to no effect.

Without making all the related files available online, any obvious thing I 
am missing? No problem displaying the files. Just don't want to throw all 
the spaghetti at the wall, unless I need to.



On Sunday, June 27, 2021 at 5:04:18 PM UTC-6 Louis King wrote:

>
> Takeshi KOMIYA thanks for the pointer. just what I was looking for. thnaks.
> On Sunday, June 27, 2021 at 7:55:15 AM UTC-6 [email protected] wrote:
>
>> Hi, 
>>
>> How about using `#:` style comment for the constant? 
>>
>> https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-automethod
>>  
>>
>> Thanks, 
>> Takeshi KOMIYA 
>>
>> 2021年6月27日(日) 8:05 Louis King <[email protected]>: 
>> > 
>> > 
>> > All, I realize in python, a constant is really just a state of mind but 
>> I would like to document them. 
>> > When I give a constant an all caps name i.e. VERBOSE in a module or 
>> class sphinx/autodoc does identify them with bold text name, following the 
>> docstring. 
>> > VERBOSE = True 
>> > I would like to add documentation, what it is and how it us used as 
>> with variables or arguments. 
>> > 
>> > Currently I am using :cvar ... to document constants, but that is less 
>> than ideal. 
>> > Am I missing something? Others have a better idea? 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups "sphinx-users" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to [email protected]. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sphinx-users/d3745971-c225-4e94-a853-acfe94b4a11fn%40googlegroups.com.
>>  
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/899af517-acc5-4c99-af74-00f661f08083n%40googlegroups.com.

Reply via email to