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

Fix #9194: autodoc: types in typing module are not hyperlinked #9997

Merged
merged 7 commits into from Dec 26, 2021

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Dec 20, 2021

Feature or Bugfix

  • Bugfix

Purpose

@tk0miya tk0miya added this to the 4.4.0 milestone Dec 20, 2021
@tk0miya tk0miya force-pushed the 9194_Literal_type_not_hyperlinked branch from da3f818 to 46da1c6 Compare December 20, 2021 17:14
This converts types in typing module to valid references when
`autodoc_unqualified_typehints` option enabled.
To support creating hyperlinks to container types naturally, py domain
should take fully-qualified typehints for them.  But nobody wants to
show "typing." module name on the signature. So this suppresses them
automatically.
@tk0miya tk0miya force-pushed the 9194_Literal_type_not_hyperlinked branch 2 times, most recently from 54045f3 to bec45e0 Compare December 24, 2021 17:54
… signature

To create hyperlinks to container types automatically, this prepends the
module names for the types under "typing" module.
@tk0miya tk0miya force-pushed the 9194_Literal_type_not_hyperlinked branch from bec45e0 to bdbad40 Compare December 25, 2021 16:04
sphinx/util/typing.py Outdated Show resolved Hide resolved
@tk0miya tk0miya force-pushed the 9194_Literal_type_not_hyperlinked branch 2 times, most recently from 9a193df to 35eafcb Compare December 25, 2021 17:26
@tk0miya tk0miya force-pushed the 9194_Literal_type_not_hyperlinked branch from 35eafcb to 2ea9118 Compare December 25, 2021 18:11
@tk0miya tk0miya merged commit 8ddf3f0 into sphinx-doc:4.x Dec 26, 2021
@tk0miya tk0miya deleted the 9194_Literal_type_not_hyperlinked branch December 26, 2021 15:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant