- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
keyword paramtype warns "more than one target found for cross-reference 'list'" #11962
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
Comments
I can confirm the issue with a smaller MWE (even though the build does not indicate an issue with the reference, but the HTML links are indeed incorrect). |
Thanks for the quick resolution @picnixz! |
@kristapratico I don't want to merge until I've added some tests, which I'll do this week-end, so you'll need to wait a bit before the fix is released. |
@picnixz no problem. Also, I did verify that your patch does fix the warnings for me. Thanks for your work! |
@picnixz any chance this bug fix will be in the next release? Thanks! |
Ah yes, I can push it but I don't have the permissions for pushing it on PyPI. |
Describe the bug
I have a class that uses keyword/paramtype to declare in the docstring that the type expected is a list[thing]: https://github.com/Azure/azure-sdk-for-python/blob/49c96611c69be2a769917dccd459692e72e945d3/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_models_py3.py#L849
This library also contains a number of classes with methods called
list(...)
.Instead of resolving list as a python list, sphinx tries to make a cross-reference to the list methods found in the library and shows the following warning:
docstring of azure.mgmt.advisor.models._models_py3.SuppressionContractListResult:1: WARNING: more than one target found for cross-reference 'list': azure.mgmt.advisor.operations.Operations.list, azure.mgmt.advisor.operations.RecommendationMetadataOperations.list, azure.mgmt.advisor.operations.RecommendationsOperations.list, azure.mgmt.advisor.operations.SuppressionsOperations.list
Note that this doesn't occur when using param / type, it seems to specifically be something about using keyword/paramtype.
How to Reproduce
Note that the tox env uses sphinx==6.2.1, but this reproduces with the latest sphinx version as well.
Environment Information
Sphinx extensions
Additional context
No response
The text was updated successfully, but these errors were encountered: