File tree Expand file tree Collapse file tree 5 files changed +7
-24
lines changed
Expand file tree Collapse file tree 5 files changed +7
-24
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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' )
Original file line number Diff line number Diff 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">→</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>' )
Original file line number Diff line number Diff 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">→</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>' )
Original file line number Diff line number Diff 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">→</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 )
You can’t perform that action at this time.
0 commit comments