Skip to content

Commit ca847d2

Browse files
committed
Fix #9585: py:property directive does not create a hyperlink for types
1 parent 9ed0542 commit ca847d2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Bugs fixed
3838
* #9456: html search: abbreation marks are inserted to the search result if
3939
failed to fetch the content of the page
4040
* #9267: html theme: CSS and JS files added by theme were loaded twice
41+
* #9585: py domain: ``:type:`` option for :rst:`dir:`py:property` directive does
42+
not create a hyperlink
4143
* #9535 comment: C++, fix parsing of defaulted function parameters that are
4244
function pointers.
4345
* #9564: smartquotes: don't adjust typography for text with

sphinx/domains/python.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,8 @@ def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]
861861

862862
typ = self.options.get('type')
863863
if typ:
864-
signode += addnodes.desc_annotation(typ, ': ' + typ)
864+
annotations = _parse_annotation(typ, self.env)
865+
signode += addnodes.desc_annotation(typ, '', nodes.Text(': '), *annotations)
865866

866867
return fullname, prefix
867868

0 commit comments

Comments
 (0)