Commit Graph

21825 Commits

Author SHA1 Message Date
Adam Dangoor
e33b6ff82d
Remove mypy overrides for `tests/test_config` (#13313) 2025-02-07 14:45:25 +00:00
Adam Dangoor
d2627c44f3
Remove type check overrides for `tests/test_extensions/test_ext_githubpages.py` (#13306) 2025-02-07 14:43:27 +00:00
Adam Dangoor
6de28062fc
Remove type check overrides for `tests/test__cli/test__cli_util_errors.py` (#13305) 2025-02-07 14:42:11 +00:00
Adam Dangoor
7799dd1b8b
Remove type check overrides for `test_build_epub` (#13296) 2025-02-07 14:41:09 +00:00
Adam Turner
22e0f8944b Use pathlib in more places 2025-02-07 13:51:42 +00:00
Adam Turner
c2bea73132 Bump mypy to 1.15.0 2025-02-07 13:34:33 +00:00
dependabot[bot]
203a600888
Bump Ruff to 0.9.5 (#13309)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-07 13:14:23 +00:00
Adam Dangoor
4467c100b4
Pin `pypi-attestations` to an exact version (#13310) 2025-02-07 08:17:46 +00:00
Adam Turner
758dc81303
Add the `intersphinx_resolve_self` option (#13291)
Co-authored-by: Jakob Lykke Andersen <Jakob@caput.dk>
2025-02-03 17:50:46 +00:00
pholica
766900e416
autodoc: Handle multiple inheritance correctly (#13136)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-03 01:46:35 +00:00
Adam Turner
774f8cc738
Add the new `py:deco` cross-reference role (#13292) 2025-02-03 01:07:38 +00:00
Kevin Deldycke
d486e801e2
Always print tracebacks in logs when Sphinx encounters an internal error (#13163)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-03 00:11:24 +00:00
Bénédikt Tran
1b83e55809
autodoc: add support for `python_display_short_literal` (#12003)
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-02 22:50:41 +00:00
Walter Dörwald
50fb4a9dbb
Add :include-subclasses: option to sphinx.ext.inheritance_diagram (#8159)
When this option is given, all sub-classes of the classes listed as arguments to `inheritance-diagram` are included in the diagram.

This makes it possible to generate a complete inheritance tree by just listing the base class and adding `:include-subclasses:`.

This is different from specifying the module that contains this base class, as this module might include other classes that should not be part of the diagram.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-02 20:52:23 +00:00
Adam Turner
34519be296
Ignore test failures from broken Babel 2.17 on Windows (#13290) 2025-02-02 20:01:21 +00:00
Adam Turner
d0107ab02c
Use ruff-action's version detection (#13286) 2025-02-01 08:08:48 +00:00
Adam Turner
0d4425ce07
Use read-only test roots (#13285) 2025-01-31 18:04:36 +00:00
Adam Turner
d24ffe2949 Improve directory handling in `app_params()` 2025-01-31 17:25:13 +00:00
Adam Turner
17b8241585 Include test roots in `pytest_report_header()` 2025-01-31 17:22:51 +00:00
Adam Turner
ad9de97a8c
Run tests on macOS in GitHub Actions (#13284) 2025-01-31 14:17:06 +00:00
Adam Turner
8e26fd7d93
Run GitHub Actions on Windows Server 2022 (#13283) 2025-01-31 14:03:39 +00:00
dependabot[bot]
9cc6881213
Bump Ruff to 0.9.4 (#13281) 2025-01-31 06:21:49 +00:00
dependabot[bot]
def8140cc6
Bump pyright to 1.1.393 (#13278) 2025-01-30 07:15:10 +00:00
Adam Turner
866881583a Shorten the `suppress_warnings` changes list 2025-01-30 01:38:35 +00:00
Tiger3018
af3bb3687c
Use warning types and sub-types in more places (#11677)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-29 19:22:44 +00:00
Chris Sewell
134bd7f1fb
Add `collapsible` option to admonition directives (#12507)
This PR adds the `collapsible` and option to the core admonition type directives, which are propagated to the nodes, e.g.

```restructuredtext
.. admonition:: title
   :collapsible:

   content

.. note:: content
   :collapsible: closed
```

For the HTML5 writer, this replaces the outer `div` with a `details` tag, and the title `p`  with a `summary` tag (with an `open` attribute if set), e.g.

```html
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>hallo</p>
</div>
```

changes to

```html
<details class="admonition note" open="open">
<summary class="admonition-title">Note</summary>
<p>hallo</p>
</details>
```

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-29 18:06:57 +01:00
Adam Turner
4936b27996 Revert keyword-only arguments change to `token_xrefs()` 2025-01-29 15:49:55 +00:00
Adam Turner
5667050dd2
Improve the displayed signature for abstract methods (#13271) 2025-01-29 02:34:46 +00:00
Adam Turner
82e9182d43
Initial implementation of an `_Inventory` type (#13275) 2025-01-29 00:46:08 +00:00
Tim Hoffmann
5871ce266a
Add support for short signatures in autosummary (#13172)
This introduces a new ``:signatures:`` option to ``sphinx.ext.autosummary``.
Possible values are:

"long" (*default*):
  same as the current default

"short":
  format functions and classes as ``func()`` if they do not
  have arguments and ``func(…)`` if they do have arguments.

"none":
  replaces the pre-existing ``:nosignatures:`` (which becomes deprecated)

The new functionality here is the "short" option.
This allows to distinguish properties and attributes
from functions and classes without costing a lot of space
for a long signature.
2025-01-29 00:44:09 +00:00
Victor Wheeler
3bc10dd90f
Note that `:term:` supports custom link text (#13120) 2025-01-29 00:07:08 +00:00
Adam Turner
56e52fcdbe
Fix type error in mocking `_fetch_inventory` (#13274) 2025-01-29 00:04:46 +00:00
Adam Turner
25d4ae578b Add missing issue and PR references in CHANGES 2025-01-28 02:06:36 +00:00
Jonny Saunders
18bb8bcef5
Implement :no-index-entry: for autodoc (#12233)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-28 02:01:31 +00:00
Adam Turner
7801540c08
Support `:no-index-entry: in .. {js,py}:module::` (#13272) 2025-01-28 01:33:28 +00:00
Simão Afonso @ Powertools Tech
60f88cc16e
Add `ref.any` as a warning sub-type (#12739)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-27 19:33:22 +00:00
Adam Turner
705c1beb16
Convert _INVALID_BUILTIN_CLASSES to use strings instead of runtime objects (#13270)
This is a more flexible approach that does not require importing several modules and types into ``sphinx.util.typing``.
2025-01-27 19:17:00 +00:00
Adam Turner
7406d4222f
Move mypy test module exclusions to per-module ignores (#13265) 2025-01-26 19:41:15 +00:00
Adam Turner
bde37bec27
Add the `autodoc_use_type_comments` option (#13269) 2025-01-26 05:47:28 +00:00
Adam Turner
44891a4eef Update the 'Python Signatures' section 2025-01-26 04:54:34 +00:00
Adam Turner
4d4123bbce Reference 'Python' instead of 'Python 3' 2025-01-26 04:52:46 +00:00
Adam Turner
9a8eeac865 Use granular syntax highlighting for the Napoleon extension 2025-01-26 04:45:49 +00:00
Adam Turner
0bc8b4115d Bump to Ruff 0.9.3 2025-01-25 00:48:18 +00:00
Adam Turner
a1c77f1725
Improve wording for the `:type:`directive option warning (#13256) 2025-01-23 14:11:57 +00:00
Adam Turner
42f300ee83
Rename the `:nowrap and :nosignatures:` directive options (#13264)
Rename the ``:nowrap`` and ``:nosignatures:`` directive options to
``:no-wrap`` and ``:no-signatures:``, for readability.
This mirrors changes already made to `:no-index`, `:no-index-entry`,
`:no-contents-entry`, and `:no-search` in Sphinx 7.2 and 7.3.
2025-01-23 04:30:46 +00:00
Adam Turner
ca2ab35d94
Add further types to `_INVALID_BUILTIN_CLASSES` (#13263) 2025-01-23 03:53:25 +00:00
Adam Turner
47bff3faea
Add new `types types to _INVALID_BUILTIN_CLASSES` (#13262) 2025-01-23 03:35:53 +00:00
Adam Turner
ea5fc5957a
Add `pathlib types to _INVALID_BUILTIN_CLASSES` (#13261) 2025-01-23 03:26:35 +00:00
Adam Turner
019a6661f4 Expand mypy's `ignore_missing_imports` list 2025-01-23 01:11:19 +00:00
Adam Turner
3f13b5a323 Match type-checked files in pyright and mypy 2025-01-23 01:02:31 +00:00