Skip to content

Commit

Permalink
Fix sphinx-doc#9585: py:property directive does not create a hyperlin…
Browse files Browse the repository at this point in the history
…k for types
  • Loading branch information
tk0miya committed Aug 29, 2021
1 parent 9ed0542 commit ca847d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -38,6 +38,8 @@ Bugs fixed
* #9456: html search: abbreation marks are inserted to the search result if
failed to fetch the content of the page
* #9267: html theme: CSS and JS files added by theme were loaded twice
* #9585: py domain: ``:type:`` option for :rst:`dir:`py:property` directive does
not create a hyperlink
* #9535 comment: C++, fix parsing of defaulted function parameters that are
function pointers.
* #9564: smartquotes: don't adjust typography for text with
Expand Down
3 changes: 2 additions & 1 deletion sphinx/domains/python.py
Expand Up @@ -861,7 +861,8 @@ def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]

typ = self.options.get('type')
if typ:
signode += addnodes.desc_annotation(typ, ': ' + typ)
annotations = _parse_annotation(typ, self.env)
signode += addnodes.desc_annotation(typ, '', nodes.Text(': '), *annotations)

return fullname, prefix

Expand Down

0 comments on commit ca847d2

Please sign in to comment.