Skip to content

py domain: All :py:* roles can refer python objects even if objtype not matched. #7243

@tk0miya

Description

@tk0miya

Describe the bug
py domain: All :py:* roles can refer python objects even if objtype not matched.

To Reproduce

Both :py:meth: and :py:class: are converted into hyperlinks to .. py:function:: foo.

.. py:function:: foo

:py:meth:`foo`
:py:class:`foo`

Expected behavior
They fails to create hyperlinks for python object when objtype is different.

Your project
N/A

Screenshots
N/A

Environment info

  • OS: Mac
  • Python version: 3.8.2
  • Sphinx version: 2.4.4
  • Sphinx extensions: N/A

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions