-
Notifications
You must be signed in to change notification settings - Fork 133
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
AutoAPI identifies imported class as an ambiguous cross-reference target in v3.1.0 and v3.1.1 #452
Comments
I just ran across this same issue when my builds started failing on readthedocs.io. I've pinned the sphinx-autoapi version for now, as mentioned by @zaneselvans, but it would be nice to not have to do that. If a test case is needed, my project is here: https://github.com/mfncooper/pyham_pe (but to reproduce the error, remember to unpin sphinx-autoapi in requirements-docs.txt before building the docs). |
As documented here (https://sphinx-autoapi.readthedocs.io/en/latest/how_to.html#how-to-customise-what-gets-documented), this is the correct behaviour:
That section describes how to control what's documented. Or you could change the |
My situation is the opposite of what you're pointing out, though. I have module A that defines class C. Then I have submodule B that imports class C. Why would it be "correct" for the importing module - module B - to document the class it's importing from module A? Specifically, my top level module defines the class ReceiveHandler: and a submodule imports that class: so that it can use it as a base class: It makes no sense for the documentation for the |
I didn't realise that was the situation. You're right that a module that's importing from another module shouldn't be documenting the class, so this sounds like a regression. |
Thanks for taking another look. In case it's helpful, the log for the failed build on readthedocs.io is here. |
Since AutoAPI 3.1.0 I have started getting a warning about multiple targets for a cross-reference, in which one is the definition of a class, and the other is that class being imported in another module. E.g. in this CI run.
See this comment
Forcing the environment to use
sphinx-autoapi>=3,<3.1
avoids the problem, but it seems like it shouldn't be an issue in either version.The text was updated successfully, but these errors were encountered: