Skip to content

Sphinx autodoc fails to reference objects through intersphinx #10468

Open
@Dreamsorcerer

Description

@Dreamsorcerer

As we don't seem to use autodoc anywhere, it seems we've missed this issue.

When using autodoc in a project, it will inspect the fully resolved name of an object, for example aiohttp.client.ClientSession. As the submodules are implementation details and we don't want to expose them to users, we only have aiohttp.ClientSession etc. in our docs.

To fix this, we should be able to use the :canonical: directive to create aliases that intersphinx can use for references. The end result should still not display the submodules to users reading the docs, but will allow intersphinx linking via the submodules.
https://www.sphinx-doc.org/en/master/usage/domains/python.html#directive-option-py-method-canonical

This probably needs to be done for almost all object in the reference docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestWe think it's good for https://hacktoberfest.digitalocean.com/bugdocumentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions