Skip to content

Commit f1017ef

Browse files
committed
Rollback renaming :nosignatures: to :no-signatures:
Since we introduced the more general ``:signatures: none` spelling, we can directly push people in this direction.
1 parent 097adc5 commit f1017ef

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

doc/usage/extensions/autosummary.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ The :mod:`sphinx.ext.autosummary` extension does this in two parts:
115115
.. versionadded:: 8.2
116116
117117
.. rst:directive:option:: nosignatures
118-
.. rst:directive:option:: no-signatures
119118
120119
Do not show function signatures in the summary.
121120
@@ -125,10 +124,9 @@ The :mod:`sphinx.ext.autosummary` extension does this in two parts:
125124
126125
.. versionchanged:: 8.2
127126
128-
The directive option ``:nosignatures:`` was renamed to ``:no-signatures:``.
127+
The directive option is superseded by the more general ``:signatures: none``.
129128
130-
The previous name has been retained as an alias,
131-
but will be deprecated and removed
129+
It will be deprecated and removed
132130
in a future version of Sphinx.
133131
134132
.. rst:directive:option:: template: filename

sphinx/ext/autosummary/__init__.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
The autosummary directive has the form::
1212
1313
.. autosummary::
14-
:no-signatures:
14+
:signatures: none
1515
:toctree: generated/
1616
1717
module.function_1
@@ -237,20 +237,13 @@ class Autosummary(SphinxDirective):
237237
'caption': directives.unchanged_required,
238238
'class': directives.class_option,
239239
'toctree': directives.unchanged,
240-
'no-signatures': directives.flag,
240+
'nosignatures': directives.flag,
241241
'recursive': directives.flag,
242242
'signatures': directives.unchanged,
243243
'template': directives.unchanged,
244-
'nosignatures': directives.flag,
245244
}
246245

247246
def run(self) -> list[Node]:
248-
# Copy the old option name to the new one
249-
# xref RemovedInSphinx90Warning
250-
# deprecate nosignatures in Sphinx 9.0
251-
if 'no-signatures' not in self.options and 'nosignatures' in self.options:
252-
self.options['no-signatures'] = self.options['nosignatures']
253-
254247
self.bridge = DocumenterBridge(
255248
self.env, self.state.document.reporter, Options(), self.lineno, self.state
256249
)

tests/roots/test-ext-autosummary-ext/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
.. autosummary::
3-
:no-signatures:
3+
:signatures: none
44
:toctree:
55

66
dummy_module

0 commit comments

Comments
 (0)