docconvert
docconvert copied to clipboard
[ReST] Make return/returns keyword parametrizable
ReST allows both :return: and :returns: as keywords for the return values of functions and methods (see here).
Currently, docconvert uses :returns: , although many projects use :return:. It would be great to have this parametrizable, e.g., in the config.
Workaround:
In docconvert/writer/rest.py (e.g., D:\envs\my-venv\Lib\site-packages\docconvert\writer\rest.py), change line 113 from:
header = self._field_token.format("returns")
to
header = self._field_token.format("return")
(Just omit the s.)
Thanks in advance 🙂