Skip to content

Documentation does not work with intersphinx (missing module name) #341

@arthur-tacca

Description

@arthur-tacca

The documentation for typing_extensions cannot be referred to from other documentation through intersphinx because it lacks a module name declaration. For example, other docs may look for typing_extensions.Unpack but find only the non-matching identifier Unpack here. Hopefully you are sympathetic considering that typing_extensions uses intersphinx itself (for referencing the core Python docs) :-)

The simple fix is to add the following to doc/index.rst on a line of its own (at the very start would be conventional):

.. module:: typing_extensions

This does have a knock-on impact that all the identifiers in the documentation will be prefixed with it (e.g. class NamedTuple would show as class typing_extensions.NamedTuple). Arguably this is an improvement as it's more consistent with most other docs, but if it's not desired then the following can be added to doc/conf.py (perhaps in the "General configuration" section):

add_module_names = False

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions