-
-
Notifications
You must be signed in to change notification settings - Fork 201
Description
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?