Commit Graph

19 Commits

Author SHA1 Message Date
Adam Turner
74ec220479 apidoc: Rename test roots 2025-01-07 11:06:29 +00:00
Adam Turner
8732b2324a Split out `sphinx.ext.apidoc._generate` 2025-01-07 08:33:20 +00:00
Adam Turner
2bd70193b7 Split out `sphinx.ext.apidoc._cli` 2025-01-07 08:32:11 +00:00
Adam Turner
47599df1bc apidoc: Add `--automodule-options` 2025-01-07 08:05:20 +00:00
Adam Turner
e17ed74fe0 Remove unneeded content from within `with` statements 2025-01-04 09:11:33 +00:00
Adam Turner
3af48520d2 Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
Adam Turner
15b46dc81e Enable the entire PYI category in Ruff 2024-11-15 01:00:36 +00:00
Adam Turner
1094556afb Bump Ruff to 0.7.2 2024-11-03 02:55:19 +00:00
Adam Turner
71c0fcfbc5
Use pathlib in the tests (#13051) 2024-10-25 22:41:08 +01:00
Adam Turner
e58dd58f35 Enable the PLR6201 lint in Ruff 2024-10-19 19:05:43 +01:00
James Addison
80c4b65a2a
apidoc: Restore support for legacy '_t'-suffix template files (#12929)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-03 00:21:03 +01:00
Adam Dangoor
b5617c0d15
Remove unused `make_app` fixtures (#12842) 2024-08-31 07:46:38 +01:00
Adam Turner
d03156e078
Format `tests/` (#12760) 2024-08-11 14:58:56 +01:00
Adam Turner
620e434f65
Improve string concatenation (#12758)
Use implicit concatenation over ``+``, and combine some implicit concatenations
to a single string literal.
2024-08-11 00:39:35 +01:00
Adam Turner
57a63ea603
Use more precise last-modified times for files (#12661) 2024-07-23 14:52:31 +01:00
M Bussonnier
6e3a191185
Bump Ruff to 0.5.1 (#12530) 2024-07-10 14:13:10 +01:00
Chris Sewell
d7e1bfeb4b
[apidoc] Add --remove-old option (#12448)
A common "gotcha" of re-running `sphinx-apidoc`, is that if the modules API changes it will not remove old files, leading to build errors for files not in a `toctree`

This commit introduces a `--remove-old` option to remove these files.

Note, a key detail here is that we don't want to simply clear the directory before running `sphinx-apidoc`,
since this would lead to all files having a new `mtime`,
and then `sphinx-build` would rebuild all of them even if they have not changed.
So we must first collect the list of all correct files, then remove any not in the list.

The commit also improves some typing of the code and replace `os.path` by `pathlib.Path` in most instances
2024-06-20 13:12:37 +02:00
danieleades
92380e60d1
[lint] add RUFF005 lint (#12068)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-14 11:26:30 +01:00
Adam Turner
462404cb25 Organise tests into directories 2024-01-17 03:56:35 +00:00