Commit Graph

21760 Commits

Author SHA1 Message Date
Thomas Louf
1418339eb9
Allow configuration of trailing commas in multi-line signatures (#12975)
Stop outputting trailing commas for C and C++, as it is invalid syntax.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Jakob Lykke Andersen <jakobandersen@users.noreply.github.com>
2025-01-21 20:08:18 +00:00
Adam Turner
fe06909e32
autodoc: Use type stub files when documenting native modules (#13253) 2025-01-21 19:36:55 +00:00
Adam Turner
e18155fa10 Note when `.. confval::` was added 2025-01-21 08:08:29 +00:00
Adam Turner
5b3f98ed80 Sort the `suppress_warnings` list and add missing entries 2025-01-21 08:06:19 +00:00
Adam Turner
68cbf4ee11 Add missing re-exports to `sphinx.util.console` 2025-01-21 07:00:07 +00:00
Bénédikt Tran
5b9fb9e060
autodoc: fix ordering of class and static methods for groupwise order (#13201)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-20 15:19:05 +00:00
Bénédikt Tran
f4a802cce7
Add required sphinx.configuration to .readthedocs.yml (#13255) 2025-01-20 11:16:46 +01:00
CyrilRoelandteNovance
34037aa4ad
Allow users to suppress `autodoc.mocked_object` warnings (#9732)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-19 23:12:40 +00:00
Adam Turner
fc62472a03
Replace `os.path.join` with pathlib (#13252) 2025-01-18 22:42:47 +00:00
Adam Turner
4b1d64d1e5 Use `app.build(force_all=True)` 2025-01-18 18:38:59 +00:00
Adam Turner
7227b09a2d Replace `path with os.path` 2025-01-18 18:38:40 +00:00
Adam Turner
b005b815ae
Define `__repr__ for ENUM` (#13251) 2025-01-18 16:20:55 +00:00
Adam Turner
31de02cc52
Bump Ruff to 0.9.2 (#13250) 2025-01-18 00:35:09 +00:00
Adam Turner
e5131ba1bd
intersphinx: Create an `_InventoryItem` type (#13248) 2025-01-17 00:41:11 +00:00
Valentin Pratz
cfb47865d6
autosummary: Respect empty module `__all__` (#13187)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-16 23:36:31 +00:00
Adam Turner
a0cd666906 intersphinx: Simplify domain detection in `IntersphinxRole.run()` 2025-01-16 21:49:35 +00:00
Adam Turner
f1ffe22fc9 intersphinx: Simplify `IntersphinxRole.is_existent_role()` 2025-01-16 21:49:34 +00:00
Adam Turner
4a1efef211 intersphinx: Avoid passing the full `BuildEnvironment` object 2025-01-16 21:43:47 +00:00
Adam Turner
d19eedf51d intersphinx: Simplify to `domain_name` where possible 2025-01-16 21:40:20 +00:00
Adam Turner
1a6672cb78 intersphinx: Use non-streaming `requests.get()` 2025-01-16 21:38:45 +00:00
Adam Turner
121181ae88 intersphinx: Specify types for config values 2025-01-16 21:38:00 +00:00
Adam Turner
ac5f51d570 intersphinx: Sort `__all__` 2025-01-16 21:37:47 +00:00
Slawomir Figiel
67f6154be3
Allow suppressing warnings for non-matching `toctree` glob patterns (#13230)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-16 18:17:21 +00:00
Takayuki SHIMIZUKAWA
099b91a9d9
Bump `ENV_VERSION for _CurrentDocument` (#13246)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-16 17:53:40 +00:00
Adam Turner
a56fdad70b
Use `sphinx._cli.util.colour in sphinx.util.console` (#13241) 2025-01-16 16:57:28 +00:00
dependabot[bot]
dd7a00dfb5
Bump pyright to 1.1.392.post0 (#13245) 2025-01-16 12:37:24 +00:00
Adam Turner
4fbcc2098e
intersphinx: Import names from proper places (#13244) 2025-01-15 21:41:34 +00:00
Adam Turner
182c831c7d
Disambiguate `:type:` as a directive option or info-field-list item (#13242) 2025-01-15 00:20:42 +00:00
Adam Turner
2431c665d6
Enable colour by default in when running on CI (#13240) 2025-01-14 19:57:07 +00:00
Adam Turner
501b8258fc
Unconditionally copy static assets in `Builder` (#13236)
Remove an early exit check for when ``docnames`` is empty.
Previously,  when building in incremental mode, static assets
(for example from HTML themes) would only be copied
when at least one document had been modified.
2025-01-14 17:39:10 +00:00
Adam Turner
b064ef3879 Enable the entire DOC category in Ruff 2025-01-14 16:04:18 +00:00
Adam Turner
c4daa95c09 Enable the entire D category in Ruff 2025-01-14 15:55:02 +00:00
Adam Turner
dbf62cd503 Enable the entire RET category in Ruff 2025-01-14 14:56:30 +00:00
Adam Turner
c66d3e85d1 Enable 11 more categories in Ruff
* flake8-builtins ('A')
* flake8-blind-except ('BLE')
* flake8-copyright ('CPY')
* eradicate ('ERA')
* flake8-boolean-trap ('FBT')
* flake8-fixme ('FIX')
* flake8-implicit-str-concat ('ISC')
* pep8-naming ('N')
* flake8-use-pathlib ('PTH')
* flake8-self ('SLF')
* tryceratops ('TRY')
2025-01-14 14:43:02 +00:00
Adam Turner
3521cb60cf Enable the entire TD category in Ruff 2025-01-14 12:52:43 +00:00
Adam Turner
d102e62bc7 Format code blocks in docstrings 2025-01-14 12:17:46 +00:00
Adam Turner
cc8161a066 Move `sphinx.util re-exports to module __getattr__` 2025-01-14 01:01:52 +00:00
Adam Turner
b52ac5c71b Review, reduce, and sort per-file ignores in Ruff 2025-01-13 23:59:11 +00:00
Adam Turner
fd8ce84582 Enable the RUF001 lint in Ruff 2025-01-13 23:40:26 +00:00
Adam Turner
477401c4e4 Enable the G003 lint in Ruff 2025-01-13 23:21:30 +00:00
Adam Turner
66905d24e1 Use strict flake8-type-checking settings in Ruff 2025-01-13 21:56:36 +00:00
Adam Turner
f6d1665f84 Use frozensets for permitted types in `app.add_config_value()` 2025-01-13 21:18:17 +00:00
dependabot[bot]
e7dd42ea91
Bump Ruff to 0.9.1 (#13235) 2025-01-13 07:09:06 +00:00
Bénédikt Tran
2a19d293b6
autodoc: fix detection of class methods implemented by extension modules (#13200)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-12 11:07:30 +00:00
Adam Turner
72ce43619c
Remove unneeded runtime typing imports (#13233) 2025-01-12 01:04:14 +00:00
Adam Turner
d29c2c1ff3
Implement key splitting in the `:kbd: role and remove KeyboardTransform` (#13227)
``KeyboardTransform.run`` takes 1.2% of the runtime of a build, but
is not be needed if ``:kbd:`` is converted to a proper role.

We implement key splitting in the ``:kbd:`` role, and return a sequence
of parsed nodes rather than a nested collection of roles with ``class="kbd compound"``.
2025-01-10 19:51:17 +00:00
Adam Turner
fdb1b0cdad Update documentation for the `:no-search:` file-wide metadata option 2025-01-10 16:56:21 +00:00
Adam Turner
404e4ffbed Consolidate both `handle_exception()` implementations 2025-01-10 15:52:39 +00:00
Adam Turner
dec45eaf28 Bump Ruff to 0.9.0 2025-01-10 13:50:26 +00:00
Adam Turner
bd864d6858 Define `__slots__ in sphinx.builders.gettext` classes 2025-01-10 12:11:29 +00:00