docconvert icon indicating copy to clipboard operation
docconvert copied to clipboard

[ReST] Make return/returns keyword parametrizable

Open G-nn-r opened this issue 9 months ago • 0 comments

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 🙂

G-nn-r avatar May 21 '25 12:05 G-nn-r