Repository navigation
Commit 21d0eeb
authored
Use Sphinx's mocking for dependencies in the docs build (#616)
The API docs show `Record.to_dataframe()` as returning `<MagicMock
id='...'>`, because `docs/conf.py` replaced NumPy, pandas, SciPy and
Matplotlib with hand-written `MagicMock` modules, and the `->
pd.DataFrame` annotation rendered as the mock's repr.
This switches to Sphinx's built-in `autodoc_mock_imports`, which shows
mocked names properly, so the signature now reads `to_dataframe() →
pandas.DataFrame`.
I compared the generated HTML with `main` (numpydoc 1.7.0 and 1.11.0):
apart from that signature in `io.html` and `wfdb.html`, every page is
identical. The docs build passes with `-W`.1 file changed
Lines changed: 3 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
37 | 28 | | |
38 | 29 | | |
39 | 30 | | |
| |||
0 commit comments