'Force sphinx autosummary to display the first line after the heading in module docstrings in modules' summary table

For classes/functions, sphinx's autosummary extension can generate a nice table summarizing the list of available classes/functions in a particular module, such that the first column consists a list of these items, and the second column consists of the first line taken from class/function docstrings as description (see below).


enter image description here


Likewise, if I have a module that itself contains several submodules, autosummary can also generate a similar summary table (see below).


enter image description here


But, as you can see, the description (i.e., the second column) in this case is simply the module's heading. For instance, in this example, the solvers.py module looks like:

"""
Solvers
=======
Brief description of 'Solvers'!
"""
...

My question is: how can I tell sphinx.autosummary to display the first line (after the heading) from the module's docstrings as the description in the summary table? For instance, in this case, I'd want autosummary to display "Brief description of 'Solvers'!" in the second column for solvers module.

Many thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source