Skip to content

Option to add hyperlink third party libraries #825

Description

@Wolf359Stella

Problem Description

Pdoc parses libraries used in the modules documented as modules themselves. These modules, which many times have external documentation in websites could be linked in the same way that the option -e allows liking external code repositories.

Proposal

Add a new command line argument that allows the user to pass libraries and hyperlinks using the same interface as -e. The switch could be -l, or link-library. This enhancement could be slowly upgraded, starting with the user needing to manually pass any import string that they want to link, for instance:

-l numpy.ndarray=https://numpy.org/doc/2.3/reference/generated/numpy.ndarray.html

And later the code could become smart enough to have mapped common used library and try to infer hyperlink using web crawlers.

Alternatives

A simpler option is use the output of
pip show
to get a hyperlink for the module

Additional context

This helps when a users uses a type hint for functions an methods. Even when common libraries are used, it should not be expect that the type is known by the user, and why not make their life easier by adding a hyperlink to send them directly to the correct web page?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions