|
11 | 11 | The autosummary directive has the form:: |
12 | 12 |
|
13 | 13 | .. autosummary:: |
14 | | - :nosignatures: |
| 14 | + :no-signatures: |
15 | 15 | :toctree: generated/ |
16 | 16 |
|
17 | 17 | module.function_1 |
@@ -237,12 +237,19 @@ class Autosummary(SphinxDirective): |
237 | 237 | 'caption': directives.unchanged_required, |
238 | 238 | 'class': directives.class_option, |
239 | 239 | 'toctree': directives.unchanged, |
240 | | - 'nosignatures': directives.flag, |
| 240 | + 'no-signatures': directives.flag, |
241 | 241 | 'recursive': directives.flag, |
242 | 242 | 'template': directives.unchanged, |
| 243 | + 'nosignatures': directives.flag, |
243 | 244 | } |
244 | 245 |
|
245 | 246 | def run(self) -> list[Node]: |
| 247 | + # Copy the old option name to the new one |
| 248 | + # xref RemovedInSphinx90Warning |
| 249 | + # deprecate nosignatures in Sphinx 9.0 |
| 250 | + if 'no-signatures' not in self.options and 'nosignatures' in self.options: |
| 251 | + self.options['no-signatures'] = self.options['nosignatures'] |
| 252 | + |
246 | 253 | self.bridge = DocumenterBridge( |
247 | 254 | self.env, self.state.document.reporter, Options(), self.lineno, self.state |
248 | 255 | ) |
@@ -462,7 +469,7 @@ def append_row(*column_texts: str) -> None: |
462 | 469 |
|
463 | 470 | for name, sig, summary, real_name in items: |
464 | 471 | qualifier = 'obj' |
465 | | - if 'nosignatures' not in self.options: |
| 472 | + if 'no-signatures' not in self.options: |
466 | 473 | col1 = f':py:{qualifier}:`{name} <{real_name}>`\\ {rst.escape(sig)}' |
467 | 474 | else: |
468 | 475 | col1 = f':py:{qualifier}:`{name} <{real_name}>`' |
|
0 commit comments