pdoc3 / pdoc3/pdoc

enable showing private methods/variables

Open
#375 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

Would like to see private methods/variables in the documentation

Actual Behavior

Methods and variables that begin with "_" are excluded.

Steps to Reproduce
  1. Generate docs that have a private method.
  2. See that the private method does not show up
Additional info
  • pdoc version: (installed from master) % pdoc --version
    pdoc 0.10.0

If I change this line:
https://github.com/mkinney/pdoc/blob/master/pdoc/__init__.py#L409

to this:

return not ident_name.startswith("__")

It does what I'd like to see.

Would it make sense to add a command line arg (or configuration setting) that would enable this?

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 in pdoc/init.py around the filtering logic at line 409, then inspect how command-line arguments or configuration settings are handled. Define how an opt-in setting should expose names beginning with a single underscore while preserving the current default behavior, and verify generated documentation for a module containing private methods or variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.