mitmproxy / mitmproxy/pdoc

Is there a way to determine if run/imported by pdoc at runtime?

Open
#449 9 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

We have to deal with C# dlls and have some wrapper objects around those.

When run with pdoc we'd like to mock these objects to get descriptive documentation.

Is there a some environment variable or anything set by pdoc that would give us this information, e.g. like if TYPE_CHECKING.

Currently we are catching import errors and replacing it with mocks, which gives us nice documentation, but in case a dll is missing we loose valuable tracebacks.

Thanks a lot for maintaining this lovely piece of code. 😸

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 reviewing pdoc's runtime import path and the import-error handling described in the issue. Determine whether the requested runtime signal is an implementation change or documented behavior, with completion defined as distinguishing pdoc imports without hiding missing-DLL tracebacks.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.