Skip to content

Autodoc: Support typing_extensions.overload #13509

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

Merged
merged 12 commits into from
May 20, 2025

Conversation

TeamSpen210
Copy link
Contributor

Purpose

I noticed that autodoc was not able to recognise @typing_extensions.overload, so the extra signatures wouldn't appear. This PR makes pycode.parser able to detect this, also adding support for @typing_extensions.final since it has the same issue.

I'm not sure if VariableCommentPicker here is public or not, since I changed the attributes there to collect both possible names. If it is I could instead add another 3 attributes, but that's less elegant.

@AA-Turner AA-Turner merged commit d71d399 into sphinx-doc:master May 20, 2025
24 checks passed
@AA-Turner
Copy link
Member

Thanks!

@TeamSpen210 TeamSpen210 deleted the typing-ext-overload branch May 20, 2025 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants