-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing classes from subpackages in __init__.py and using automodule gives reference target not found errors #7493
Labels
Milestone
Comments
thomascobb
changed the title
Gathering together classes from subpackages in __init__.py and using automodule gives reference target not found errors
Importing classes from subpackages in __init__.py and using automodule gives reference target not found errors
Apr 16, 2020
Thank you for reporting. Indeed, it is the biggest problem for autodoc now. I'm trying to define a canonical name for each python object in #7463. |
Now Sphinx-v4.0.0b1 can process this correctly. Please try it. refs: #9026 |
This fixes it, thanks |
altendky
added a commit
to altendky/qtrio
that referenced
this issue
May 24, 2021
altendky
added a commit
to altendky/qtrio
that referenced
this issue
May 24, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Consider a module which splits classes into their own files and pulls them together in
__init__.py
. It has a folder structure like this:Where
__init__.py
looks like this:_types.py
looks like this:_util.py
looks like this:If you document with:
Then you get a warning like:
I guess an alias dictionary of cross-references might help (when automodule encounters
mymodule.MyClass
, it looks atMyClass.__module__
and registers it as the cross-reference for that too). I'm happy to have a go at fixing this if you can point me at where this alias dictionary might be added.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The signature of say_hello_lots() should have reference dls_python3_template_module.HelloClass, not dls_python3_template_module._types.HelloClass.
Environment info
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: