Skip to content

Improve line numbers for docstrings #12894

Open
@dimaqq

Description

@dimaqq

I get warnings like this:

/code/operator/ops/__init__.py:docstring of ops:42: WARNING: py:attr reference target not found: ...

The thing is, the file starts with a large comment preamble (you may use this software...) and line 42 of the docstring corresponds to line 56 of the file in my case.

Which means that for large multiline docstrings, the docstring line number is not very useful.

Could Sphinx show this instead?

/code/operator/ops/__init__.py:56: docstring of ops: WARNING: py:attr reference target not found: ...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions