At 6:43pm -0400 Wed, 04 Jul 2012, Dleach wrote:
> How do I get autodoc to highlight the optional parameters?
>
> The standard python documentation seems to use brackets ('[]') around
> the optional parameters. Consider the following method defined in my
> zork.py module:
> what I would like though is:
>
> zork.zorky(a[, b=none])
> zork.zorky(a[, b=none[, c=none]])
I hear your pain, but I don't think there's an elegant solution. I
would love to be do this, and asked a similar question a few days ago to
the tune of crickets:
https://groups.google.com/d/topic/sphinx-dev/TfY7zRII05c/discussion
I'm only aware of these four options:
.. automodule::
This pretty much does the entire file
.. autoclass::
This does a single class
.. autofunction::
This does a single function
.. function::
This does exactly and only what you write in this very space, with
the exception that it adds the CSS specific code (or whatever's
appropriate for the final documentation form). Meaning, you write
the documentation right here.
With autofunction, I've sinced learned it has only a single option:
':noindex:', which is not what I want or need.
Unfortunately, it looks like you either override everything (function::)
or nothing(auto...::), with little in-between. If you find otherwise,
I'd love to hear it.
Sorry mate,
Kevin