sphinx-doc / sphinx-doc/sphinx
Way to refresh python module after an autodoc
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
It took me a while to figure that I was having issues with conflicting instances of get_annotations (or equivalent) due to the order in which they were executed, where I end up with weird states of ForwardRef or it can no longer evaluate with get_annotations(eval_str=True) or many other symptoms.
Describe the solution you'd like
Have a way to refresh the modules after autodoc has finished processing them for itself
Describe alternatives you've considered
Alternatively I could try to read the autodoc files afterwards, but I am concerned that it would have similar issues from the other side.
Edit: For now re-ordering does seem to work, but it requires reorganizing the doc structure so that the folder is alphabetically last
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 by tracing Sphinx's autodoc module-processing flow and how it interacts with Python annotation evaluation, especially get_annotations and ForwardRef. Define how a post-autodoc refresh should work and verify that conflicting annotation states are cleared without requiring documentation reordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100