sphinx-autoapi icon indicating copy to clipboard operation
sphinx-autoapi copied to clipboard

fix(typing): User may not have provided a return annotation for an overload

Open bzoracler opened this issue 9 months ago • 2 comments

If the source code doesn't provide a return type annotation on one or more overloads, then 1-indexed value of the inner tuple, representing the annotation, can be None.

This is a consequence of the following:

https://github.com/readthedocs/sphinx-autoapi/blob/6dae5a3fa2d3c76cc28997a61d052376606a1bc1/autoapi/_parser.py#L459-L461

https://github.com/readthedocs/sphinx-autoapi/blob/6dae5a3fa2d3c76cc28997a61d052376606a1bc1/autoapi/_parser.py#L303

https://github.com/readthedocs/sphinx-autoapi/blob/6dae5a3fa2d3c76cc28997a61d052376606a1bc1/autoapi/_astroid_utils.py#L665

bzoracler avatar May 13 '25 01:05 bzoracler

@bzoracler Thanks for making this change! Please could you fix the failing tests. It looks like you need to add release notes (see https://github.com/readthedocs/sphinx-autoapi?tab=readme-ov-file#release-notes).

AWhetter avatar Jun 26 '25 04:06 AWhetter

@AWhetter Thank you for pointing me to that, could you enable the workflow again?

bzoracler avatar Jun 26 '25 04:06 bzoracler