Skip to content
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

autodoc: automatically populate type hints in docstring description #6418

Closed
svenevs opened this issue May 31, 2019 · 2 comments
Closed

autodoc: automatically populate type hints in docstring description #6418

svenevs opened this issue May 31, 2019 · 2 comments
Labels
extensions:autodoc type:enhancement enhance or introduce a new feature
Milestone

Comments

@svenevs
Copy link
Contributor

svenevs commented May 31, 2019

Continuation of #6361, which is closing via #6397. Low priority, lofty goal, will take time.

#6361 (comment)

autodoc_typehints = "signature" | "description" | "none"

* "signature": Show typehints as signature (as is). This is default choice.
* "description": Show typehints as object description (info field list or napoleon (if possible)).
* "none": Do not show typehints.

This issue is tracking the "description" component.

  • Initial goal: add :type: and :rtype: annotations.
  • Harder: play nicely with napoleon. May be possible to bend napoleon to leverage :type: and :rtype: rather than trying to edit description directly and try to place type hints in expected location.
    • Investigation required (assign-to @svenevs).
@tk0miya
Copy link
Member

tk0miya commented Jan 11, 2020

I just post a draft PR #7018 for this. I believe it reaches the first goal of this issue. Please try it out :-)

@tk0miya
Copy link
Member

tk0miya commented Jan 31, 2020

I'm closing this now because new issue #7077 is added for remaining task (napoleon).
Thanks!

@tk0miya tk0miya closed this as completed Jan 31, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions:autodoc type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants