readthedocs / readthedocs/sphinx-autoapi

Full name not resolved correctly for class not imported from real source

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

Nobody has claimed this yet.

Language: Python Needed: Design Decision
Dominant language
Python
Stars
494
Forks
147
Avg merge
9m
Merged PRs (30d)
1

Description

(Please let me know if the title could be improved)

I have a class C defined in submodule B of module A, so full python name would be A.B.C. But the class is imported in the __init__.py of A, thus exposed from the module A. And it is imported from there by other packages.

Autoapi does only resolve the name to A.C, this causes that cross-reference from other packages don't work. As in the objects.inv A.C is not available, only A.B.C.

Is there anyway this could be solved?

Contributor guide

No contributing guide indexed for this repository

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 reproducing the reported setup: class C in A.B, re-exported by A.init, and imported by another package. Trace AutoAPI's name resolution and generated objects.inv entries; done when the canonical A.B.C name is retained and cross-references from other packages resolve correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.