enable showing private methods/variables
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
- Generate docs that have a private method.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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