Skip to content

Dedent section starting with .. deprecation::#575

Open
stefanv wants to merge 3 commits into
numpy:mainfrom
stefanv:deprecation-position-fix
Open

Dedent section starting with .. deprecation::#575
stefanv wants to merge 3 commits into
numpy:mainfrom
stefanv:deprecation-position-fix

Conversation

@stefanv
Copy link
Copy Markdown
Contributor

@stefanv stefanv commented Jul 17, 2024

Closes #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

@stefanv
Copy link
Copy Markdown
Contributor Author

stefanv commented May 22, 2026

@rossbar @larsmans I think this is ready. It does close an issue, and I think it is an innocuous change. Users should not be forced to add a new section just to indicate that a docstring is deprecated (see original issue #573).

@larsoner
Copy link
Copy Markdown
Collaborator

@stefanv would it be easy to add a regression test for this? If it's a pain I think we can get away without it

@stefanv
Copy link
Copy Markdown
Contributor Author

stefanv commented May 23, 2026

Of course!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation rule GL09 failing

2 participants