Unfortunately – function signature as the first line doesn't change 
anything.

Adding:

.. autofunction:: func

to .rst file does the work, but I would like this function to be documented 
with sole automodule as I am generating the documentation for very many 
modules with many decorated functions and would like to avoid writing some 
generator as for now.

W dniu poniedziałek, 19 czerwca 2017 14:56:19 UTC+2 użytkownik Peter 
Burdine napisał:
>
> IIRC the current versions of Sphinx/Autodoc don't work well with decorated 
> functions.  Try adding the actual function signature as the first line in 
> the doc string.  Eg:
>
> @Operation.register('foo')
> def func(arg):
>      """func(arg)
>      
>     Documentation of decorated function"""
>     pass      
>
>
>
>
> On Friday, June 16, 2017 at 4:35:39 PM UTC-7, Maciek Olko wrote:
>>
>> Hi all,
>> consider the snippet [1] and autodoc-automodule-decorated-docstrings.rst:
>>
>> autodoc-automodule-decorated-docstrings module
>> ==============================================
>>
>> .. automodule:: autodoc-automodule-decorated-docstrings
>>     :members:
>>     :undoc-members:
>>     :show-inheritance:
>>
>> Decorated function func() is missing from generated documentation. Do 
>> you know why it is omitted? It is IMO proper member of the module.
>>
>> [1] https://gist.github.com/m-aciek/e45c912a1b4720f843635dfba3a50ad1
>>
>> Regards,
>> Maciej
>>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to