Skip to content

References from autodoc signatures should be resolved via py:obj role, not py:class #14005

@taminomara

Description

@taminomara

I have a code base that uses lots of type aliases. Most of them are documented as py:type, and some literal types are documented as py:data. Because of this, references to these objects are not resolved, because python domain uses py:class role to search for them.

I believe that we should use py:obj for all references generated in signatures. I don't see anything that can break if we change current behavior. After all, Python domain doesn't handle objects of different types sharing the same fully-qualified name, so there should be no collisions.

Alternatively, we can make a new role for this (I use lua:_auto in my Lua extension). This will allow easily suppressing nitpicks originating from signatures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions