mitmproxy / mitmproxy/pdoc

Option to add hyperlink third party libraries

Open
#825 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
2.5k
Forks
228
PR merge metrics
No merged PRs in 30d

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing -e command-line option and how pdoc represents imported libraries in generated documentation. Define the initial scope around manually supplied import-to-URL mappings, and verify that a mapping such as numpy.ndarray produces a hyperlink in the rendered output; the later web-crawling idea is outside that first milestone.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.