New submission from Pauli Virtanen <[EMAIL PROTECTED]>:

It would be useful if the 

    autodoc-process-docstring

event from sphinx.ext.autodoc allowed to change the argspec of the 
function being documented. Some other hook for changing the function 
signature would also do.

We are using Sphinx for generating a reference guide for Numpy, where 
many of the functions are from extension modules for which 
inspect.getargspec does not work. Instead, the function signature is 
contained within the object's docstring. Right now I'm simply 
monkeypatching sphinx.ext.autodoc.format_signature, but a cleaner 
approach would be better.

It seems that this would be fairly easy to implement in generate_rst. 
Perhaps a .signature attribute to the Options passed to the hook would 
be an acceptable solution?

I can write a patch doing this, if someone doesn't do this faster.

----------
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 70096
nosy: georg.brandl, pv
severity: normal
status: open
title: sphinx.doc.autodoc: Hook for changing argspec
type: feature request
versions: 3rd party

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3422>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to