numpy / numpydoc

Numpy's Sphinx extensions
https://numpydoc.readthedocs.io/
Other
294 stars 160 forks source link

Dedent section starting with `.. deprecation::` #575

Open stefanv opened 2 months ago

stefanv commented 2 months ago

Closes https://github.com/numpy/numpydoc/issues/573

There may be a more elegant way to fix this. Problem is that section that starts with deprecation warning comes back indented, and therefore fails to meet the test doc.extended_summary.startswith(".. deprecated:: ").

Reproducer:

foo.py:

def my_func_right():
    """Compute my function.

    .. deprecated:: v0.1
        This function is listed for future removal.

    What it does in more detail.
    """
    pass
$ numpydoc lint foo.py