Skip to content

Commit 9aedeee

Browse files
committed
Remove configuration option html_signaturereturn_icon.
1 parent 798adc4 commit 9aedeee

File tree

5 files changed

+7
-24
lines changed

5 files changed

+7
-24
lines changed

doc/usage/configuration.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,13 +1191,6 @@ that use Sphinx's HTMLWriter class.
11911191

11921192
.. versionadded:: 3.5
11931193

1194-
.. confval:: html_signaturereturn_icon
1195-
1196-
A text for prepended to the type hint for the return type of a function or
1197-
method. HTML tags are allowed. Default: an arrow; ``→``
1198-
1199-
.. versionadded:: 4.1
1200-
12011194
.. confval:: html_sidebars
12021195

12031196
Custom sidebar templates, must be a dictionary that maps document names to

sphinx/builders/html/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,6 @@ def setup(app: Sphinx) -> Dict[str, Any]:
13201320
app.add_config_value('html_add_permalinks', UNSET, 'html')
13211321
app.add_config_value('html_permalinks', True, 'html')
13221322
app.add_config_value('html_permalinks_icon', '¶', 'html')
1323-
app.add_config_value('html_signaturereturn_icon', '→', 'html')
13241323
app.add_config_value('html_use_index', True, 'html')
13251324
app.add_config_value('html_split_index', False, 'html')
13261325
app.add_config_value('html_copy_source', True, 'html')

sphinx/writers/html.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ def depart_desc_type(self, node: Element) -> None:
174174
pass
175175

176176
def visit_desc_returns(self, node: Element) -> None:
177-
self.body.append(' <span class="sig-return"><span class="sig-return-icon">')
178-
self.body.append(self.config.html_signaturereturn_icon)
179-
self.body.append('</span> <span class="sig-return-typehint">')
177+
self.body.append(' <span class="sig-return">')
178+
self.body.append('<span class="sig-return-icon">&#x2192;</span>')
179+
self.body.append(' <span class="sig-return-typehint">')
180180

181181
def depart_desc_returns(self, node: Element) -> None:
182182
self.body.append('</span></span>')

sphinx/writers/html5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def depart_desc_type(self, node: Element) -> None:
145145
pass
146146

147147
def visit_desc_returns(self, node: Element) -> None:
148-
self.body.append(' <span class="sig-return"><span class="sig-return-icon">')
149-
self.body.append(self.config.html_signaturereturn_icon)
150-
self.body.append('</span> <span class="sig-return-typehint">')
148+
self.body.append(' <span class="sig-return">')
149+
self.body.append('<span class="sig-return-icon">&#x2192;</span>')
150+
self.body.append(' <span class="sig-return-typehint">')
151151

152152
def depart_desc_returns(self, node: Element) -> None:
153153
self.body.append('</span></span>')

tests/test_build_html.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,17 +1628,8 @@ def test_html_permalink_icon(app):
16281628

16291629

16301630
@pytest.mark.sphinx('html', testroot='html_signaturereturn_icon')
1631-
def test_html_signaturereturn_icon_default(app):
1631+
def test_html_signaturereturn_icon(app):
16321632
app.build()
16331633
content = (app.outdir / 'index.html').read_text()
16341634

16351635
assert ('<span class="sig-return-icon">&#x2192;</span>' in content)
1636-
1637-
1638-
@pytest.mark.sphinx('html', testroot='html_signaturereturn_icon',
1639-
confoverrides={'html_signaturereturn_icon': '<span>RETURN</span>'})
1640-
def test_html_signaturereturn_icon_custon(app):
1641-
app.build()
1642-
content = (app.outdir / 'index.html').read_text()
1643-
1644-
assert ('<span class="sig-return-icon"><span>RETURN</span></span>' in content)

0 commit comments

Comments
 (0)