sphinx-doc / sphinx-doc/sphinx
autodoc loses the first staticmethod parameter if the method is name mangled
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Static methods lose their first parameter in signature if they are also name mangled, i.e. __begins_like_this().
Similar to #4769 and #5032.
To Reproduce
Please download my sample project and build the documentation
C:\> cd sphinx_private_static\docs
C:\sphinx_private_static\docs> sphinx-build Source Build
Expected behavior
Parameter is not dropped from signature
Your project
sphinx_private_static.zip
Environment info
- OS: Windows 10 Version 1909
- Python version: 3.8
- Sphinx version: 4.0.2
- Sphinx extensions: sphinx.ext.autodoc
- Extra tools: Browser, PyCharm CE with venv (didn't inherit site-packages)
@tk0miya This is my follow-up as requested in #9318. Thank you!
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 with the supplied sphinx_private_static sample project and build its documentation using sphinx-build Source Build from the docs directory. Trace the issue through the sphinx.ext.autodoc entry point and verify that the generated signature for a name-mangled static method retains its first parameter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100