0

I'm trying to document a list of common parameters that exist in a few classes. However, I would prefer not to repeat the documentation and instead have the list of common parameters show up in only one place.

Usually, in Sphinx, you can do something like

.. autofunction:: foo
   :param str a: description of a
   :param int b: description of b

And it will give an output of the format

foo
Parameters: - a (str) - description of a
            - b (str) - description of b

However, since these parameters are all common, I would like to do this without using any autofunction type thing. I've created a custom extension that can take docstrings for individual parameters, and put them in the format

:param str a: description of a
:param int b: description of b

But I cannot seem to get the same output, and I'm instead getting this

bad output

mzjn
  • 48,958
  • 13
  • 128
  • 248
sxh
  • 13
  • 3

0 Answers0