Open DareDevilDenis opened 9 months ago
Thank you for your report. I don't have time for checking this one now but it's interesting to know that relative imports seem to do the trick. At least it can help in the investigation.
EDIT: Since we already have quite a lot of issues marked with help wanted, I will not add it to this issue, until orher more important issues are solved.
Describe the bug
My project has the following structure:
module_b.py
has a class ChildClass that inherits from ParentClass inmodule_a.py
The problem is that in the HTML for
module_b.py
the reference to ParentClass is not clickable. However, the link to the propery of type CommonClass is clickable:module_a.py
has the content:module_b.py
has the content:source.package_b.module_b.rst
has the content:If the imports in
module_b.py
are changed from absolute references:to relative references:
then the link to ParentClass becomes clickable, however we should not be forced to use relative references (in fact, the Ruff linter says "Prefer absolute imports over relative imports from parent module")
How to Reproduce
The attached file has this small project and the HTML output: python_parent_class_not_clickable.zip
Environment Information
Sphinx extensions
Additional context
No response