Commit Graph

21729 Commits

Author SHA1 Message Date
James Addison
872d270f10
linkcheck: support ignored-URIs for redirects (#13127)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-05 01:20:15 +00:00
Adam Turner
182f621cad Record the change to Napoleon type preprocessing in CHANGES.rst 2025-01-05 01:18:29 +00:00
Chris Barrick
8d75ae2d6b Napoleon: Unify the type preprocessing logic
Previously, there were two type preprocessing functions:
`_convert_type_spec` (used in Google-style docstrings) and
`_convert_numpy_type_spec` (used in Numpy-style docstrings).

The Google version simply applied type-alias translations or wrapped
the text in a `:py:class:` role.

The Numpy version does the same, plus adds special handling for keywords
`optional` and `default` and delimiter words `or`, `of`, and `and`. This
allows one to write in natural language, like `Array of int` instead of
`Array[int]` or `Widget, optional` instead of `Optional[Widget]` or
`Widget | None`. Numpy style is described in full at:
https://numpydoc.readthedocs.io/en/latest/format.html#parameters

This commit eliminates the distinction and allows Google-style
docstrings to use these preprocessing rules.
2025-01-05 01:18:29 +00:00
Chris Barrick
0dbaa5b6d1 Napoleon: Move the type preprocessing code
This puts all preprocessing code above both docstring classes, rather
than in between. This is in preparation to making both docstring classes
share the same preprocessing.
2025-01-05 01:18:29 +00:00
Adam Turner
02beccac0a
intersphinx: Define a restricted subset of Config as `InvConfig` (#13210) 2025-01-05 01:06:51 +00:00
Adam Turner
619a10efa7
intersphinx: Simplify `_fetch_inventory()` (#13209)
The streams-based interfaces in intersphinx and ``sphinx.util.inventory``
are clever, but also complex and prevent using compression methods
that don't support incrememntal decoding. This change refactors
``_fetch_inventory()`` to read all inventory content from disk or an
HTTP request at once.
2025-01-05 00:34:49 +00:00
Adam Turner
e17ed74fe0 Remove unneeded content from within `with` statements 2025-01-04 09:11:33 +00:00
Adam Turner
f63784310c Use script metadata in utils/convert_attestations.py 2025-01-04 09:11:33 +00:00
Adam Turner
81832e1dc7 Use pathlib in further places 2025-01-04 09:11:33 +00:00
Maciej Olko
ad0c343d36
Trim leading whitespace before doctest flags (#13164) 2025-01-04 00:30:03 +00:00
Tim Hoffmann
432bc5e50b
Add a class option to the autosummary directive (#13144)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-04 00:28:59 +00:00
Adam Turner
e65bbb96ae
Create a new type for the current document's environment state (#13151) 2025-01-04 00:28:03 +00:00
Adam Turner
c7eaf175e6
linkcheck: Use pattern matching for redirected requests (#13206) 2025-01-03 23:08:02 +00:00
Nicolas Peugnet
0fbf88a59f
Allow extensions to define the keys returned by linkcode (#11824)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-03 21:28:34 +00:00
Adam Turner
20c1c7fc1c Use list literals 2025-01-03 20:56:48 +00:00
Adam Turner
546dd50c41 Use dictionary literals 2025-01-03 20:54:06 +00:00
Adam Turner
3028e818c9
Remove test skips for Python 3.14 (#13041) 2025-01-03 07:31:40 +00:00
Adam Turner
91b566de6b Split `write_temporary_file() from save_traceback()` 2025-01-03 06:45:39 +00:00
Adam Turner
2ae1d7f9c3 Split `format_traceback() from save_traceback()` 2025-01-03 06:43:06 +00:00
Adam Turner
e8f3c4902d Strip "erase entire line" control sequences in `sphinx._cli` 2025-01-03 06:39:30 +00:00
James Addison
f59f978555
Fix path resolution during 'sphinx.cmd.make_mode' cleanup (#13158) 2025-01-03 05:45:58 +00:00
Julien Lecomte
fddbd7d151
Add new `duplicate_declaration.{c,cpp}` warning types (#13173)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-03 02:48:07 +00:00
Rafael Fontenelle
504eecada8
Remove unnecessary brackets from `meth` roles (#13193) 2025-01-03 01:41:14 +00:00
Adam Turner
00ad109a39 Run Ruff on `tests/roots/` 2025-01-03 01:33:14 +00:00
Adam Turner
b176c66f8c Enable the FURB113 lint in Ruff 2025-01-03 01:13:05 +00:00
Adam Turner
ff2693242d Run Ruff on `doc/usage/extensions/` 2025-01-02 23:59:48 +00:00
Adam Turner
013dcdc3b8 Run Ruff on `tests/js/roots/` 2025-01-02 23:53:59 +00:00
Adam Turner
c123c7b914 Remove all [format.exclude] entries 2025-01-02 23:49:44 +00:00
Adam Turner
43bf986891 Enable the RET503 lint in Ruff 2025-01-02 23:49:44 +00:00
Adam Turner
2aad3a87f4 Enable the entire Q category in Ruff 2025-01-02 23:49:44 +00:00
Adam Turner
e459a65775 Enable the entire RUF category in Ruff 2025-01-02 23:49:44 +00:00
Adam Turner
077029b609 Enable new RUF rules 2025-01-02 23:49:44 +00:00
Adam Turner
b5f9ac8afc Enable the RUF100 lint in Ruff 2025-01-02 23:49:43 +00:00
Adam Turner
5f6457911d Enable the RUF048 lint in Ruff 2025-01-02 23:49:43 +00:00
Adam Turner
6d3ec7441f Enable the RUF046 lint in Ruff 2025-01-02 23:49:43 +00:00
Adam Turner
05fc47f120 Enable the RUF043 lint in Ruff 2025-01-02 23:49:43 +00:00
James Addison
6678e35704
html search: add safety check before index property accesses (#13153) 2025-01-02 23:06:35 +00:00
Adam Turner
4d77504a7b Suggest GitHub Discussions in the issue chooser 2025-01-02 23:00:58 +00:00
Adam Turner
9d9eff6151 Refresh the PULL_REQUEST_TEMPLATE 2025-01-02 22:58:10 +00:00
Dmitry Shachnev
de4d3171a8
Do not perform any timezone conversions if SOURCE_DATE_EPOCH is set (#13203)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-02 22:36:46 +00:00
Christian Clauss
3967c7d3ac
Use `astral-sh/ruff-action and astral-sh/setup-uv` in GitHub Actions (#13198)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-02 22:27:39 +00:00
dependabot[bot]
90d50c1320
Bump pyright to 1.1.391 (#13183) 2025-01-02 21:25:19 +00:00
Adam Turner
f062ef7fc2 Bump mypy to 1.14.1 2025-01-02 21:18:19 +00:00
Adam Turner
64937535dc Bump Ruff to 0.8.5 2025-01-02 21:11:36 +00:00
Adam Turner
1aaea6bee2 Bump Ruff to 0.8.4 2025-01-02 21:09:38 +00:00
Adam Turner
2e5e39ef10 Bump Ruff to 0.8.3 2025-01-02 21:08:57 +00:00
Adam Turner
7393ab11b9 Bump Ruff to 0.8.2 2025-01-02 21:08:04 +00:00
Adam Turner
bec014cf7e
Cease using flake8 (#13204) 2025-01-02 21:01:20 +00:00
Adam Turner
4bf0b2b43a Happy New Year! 2025-01-02 20:53:47 +00:00
Adam Turner
37ab81156f Sort [format] table in .ruff.toml 2025-01-02 17:13:25 +00:00