Commit 1a62f31 1 parent 13d2899 commit 1a62f31 Copy full SHA for 1a62f31
File tree 4 files changed +13
-9
lines changed
4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Contributors
45
45
* Daniel Eades -- improved static typing
46
46
* Daniel Hahler -- testing and CI improvements
47
47
* Daniel Pizetta -- inheritance diagram improvements
48
- * Dave Hoese -- ``sphinx.ext.viewcode `` bug fix
48
+ * Dave Hoese -- ``sphinx.ext.viewcode `` and `` sphinx.ext.apidoc `` bug fixes
49
49
* Dave Kuhlman -- original LaTeX writer
50
50
* Dimitri Papadopoulos Orfanos -- linting and spelling
51
51
* Dmitry Shachnev -- modernisation and reproducibility
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ Bugs fixed
18
18
19
19
* #13392: Fix argument type for ``jieba.load_userdict() ``.
20
20
* #13402: Ensure inline ``<script> `` tags are written exactly once.
21
+ * #13391: apidoc: Fix TOC file not having a title.
22
+ Patch by Dave Hoese.
21
23
22
24
Testing
23
25
-------
Original file line number Diff line number Diff line change @@ -217,7 +217,6 @@ def _parse_module_options(
217
217
dest_dir = dest_path ,
218
218
module_path = module_path ,
219
219
exclude_pattern = exclude_patterns ,
220
- automodule_options = automodule_options ,
221
220
max_depth = max_depth ,
222
221
quiet = True ,
223
222
follow_links = bool_options ['follow_links' ],
@@ -226,6 +225,8 @@ def _parse_module_options(
226
225
no_headings = bool_options ['no_headings' ],
227
226
module_first = bool_options ['module_first' ],
228
227
implicit_namespaces = bool_options ['implicit_namespaces' ],
228
+ automodule_options = automodule_options ,
229
+ header = module_path .name ,
229
230
)
230
231
231
232
Original file line number Diff line number Diff line change @@ -782,13 +782,14 @@ def test_sphinx_extension(app: SphinxTestApp) -> None:
782
782
app .build ()
783
783
assert app .warning .getvalue () == ''
784
784
785
- assert set ((app .srcdir / 'generated' ).iterdir ()) == {
786
- app .srcdir / 'generated' / 'modules.rst' ,
787
- app .srcdir / 'generated' / 'my_package.rst' ,
788
- }
789
- assert 'show-inheritance' not in (
790
- app .srcdir / 'generated' / 'my_package.rst'
791
- ).read_text (encoding = 'utf8' )
785
+ toc_file = app .srcdir / 'generated' / 'modules.rst'
786
+ pkg_file = app .srcdir / 'generated' / 'my_package.rst'
787
+ assert set ((app .srcdir / 'generated' ).iterdir ()) == {toc_file , pkg_file }
788
+ modules_content = toc_file .read_text (encoding = 'utf8' )
789
+ assert modules_content == (
790
+ 'src\n ===\n \n .. toctree::\n :maxdepth: 3\n \n my_package\n '
791
+ )
792
+ assert 'show-inheritance' not in pkg_file .read_text (encoding = 'utf8' )
792
793
assert (app .outdir / 'generated' / 'my_package.html' ).is_file ()
793
794
794
795
# test a re-build
You can’t perform that action at this time.
0 commit comments