Skip to content

Conversation

bzoracler
Copy link

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:

grouped["overloads"].append(
(child_data["args"], child_data["return_annotation"])
)

"return_annotation": _astroid_utils.get_return_annotation(node),

def get_return_annotation(node: astroid.nodes.FunctionDef) -> str | None:

@AWhetter
Copy link
Collaborator

@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).

@bzoracler
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants