We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ed0542 commit 3e24190Copy full SHA for 3e24190
CHANGES
@@ -38,6 +38,8 @@ Bugs fixed
38
* #9456: html search: abbreation marks are inserted to the search result if
39
failed to fetch the content of the page
40
* #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
43
* #9535 comment: C++, fix parsing of defaulted function parameters that are
44
function pointers.
45
* #9564: smartquotes: don't adjust typography for text with
sphinx/domains/python.py
@@ -861,7 +861,8 @@ def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]
861
862
typ = self.options.get('type')
863
if typ:
864
- signode += addnodes.desc_annotation(typ, ': ' + typ)
+ annotations = _parse_annotation(typ, self.env)
865
+ signode += addnodes.desc_annotation(typ, '', nodes.Text(': '), *annotations)
866
867
return fullname, prefix
868
tests/test_domain_py.py
@@ -833,13 +833,15 @@ def test_pyproperty(app):
833
entries=[('single', 'prop1 (Class property)', 'Class.prop1', '', None)])
834
assert_node(doctree[1][1][1], ([desc_signature, ([desc_annotation, "abstract property "],
835
[desc_name, "prop1"],
836
- [desc_annotation, ": str"])],
+ [desc_annotation, (": ",
837
+ [pending_xref, "str"])])],
838
[desc_content, ()]))
839
assert_node(doctree[1][1][2], addnodes.index,
840
entries=[('single', 'prop2 (Class property)', 'Class.prop2', '', None)])
841
assert_node(doctree[1][1][3], ([desc_signature, ([desc_annotation, "class property "],
842
[desc_name, "prop2"],
843
844
845
846
assert 'Class.prop1' in domain.objects
847
assert domain.objects['Class.prop1'] == ('index', 'Class.prop1', 'property', False)
0 commit comments