Commit Graph

1188 Commits

Author SHA1 Message Date
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
fe06909e32 autodoc: Use type stub files when documenting native modules (#13253) 2025-01-21 19:36:55 +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
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
c4daa95c09 Enable the entire D category in Ruff 2025-01-14 15:55:02 +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
66905d24e1 Use strict flake8-type-checking settings in Ruff 2025-01-13 21:56:36 +00:00
Adam Turner
dec45eaf28 Bump Ruff to 0.9.0 2025-01-10 13:50:26 +00:00
Adam Turner
74ec220479 apidoc: Rename test roots 2025-01-07 11:06:29 +00:00
Adam Turner
91bae649c1 Remove shebang from test-apidoc-toc test root 2025-01-06 21:55:29 +00:00
Adam Turner
a69d79bf67 Add .gitattributes 2025-01-06 21:55:29 +00:00
Adam Turner
d59084a1fa Bump Ruff to 0.8.6 2025-01-06 06:05:55 +00:00
ProGamerGov
fec4d7c2f1 Viewcode: Fix issue with import paths that differ from the directory structure (#13195)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-05 10:43:57 +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
00ad109a39 Run Ruff on `tests/roots/` 2025-01-03 01:33:14 +00:00
Adam Turner
34f5a8d503 Avoid using camelCase names in autodoc tests 2024-12-09 14:59:25 +00:00
Adam Turner
2d2b73c706 Avoid using camelCase names in autosummary tests 2024-12-09 14:57:08 +00:00
Adam Turner
801c60a873 Consistently calculate the current file's directory 2024-11-03 17:28:02 +00:00
Adam Turner
71c0fcfbc5 Use pathlib in the tests (#13051) 2024-10-25 22:41:08 +01:00
khanxmetu
8351936994 Ensure deterministic resolution of toctree (#12888)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-09 21:20:25 +01:00
Adam Turner
886bb945af Log differences in configuration from the pickled environment (#12949) 2024-10-08 06:25:49 +01:00
Adam Turner
3677dd1bca Shorten `copyright` in the ChangesBuilder tests 2024-10-04 12:33:03 +01:00
Adam Turner
5f3846f8c6 Improve testing for copyright year substitution (#12950) 2024-10-03 21:56:50 +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
Jean-François B.
1c131dfffe LaTeX: make contents, topic, and sidebar separately customizable (#12704)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-08-19 20:43:47 +02:00
Jean-François B.
4c7fe10a4b LaTeX: fix mark-up when \DUrole is used with multiple classes (#12745) 2024-08-17 20:33:15 +02:00
Adam Dangoor
ae8b37793d Improve typing for `mocksvgconverter.py` (#12788)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-16 22:35:32 +01:00
Jeremy Bowman
0cbdd98ffb Correctly support custom gettext output templates (#12645)
Co-authored-by: Jeremy Bowman <jmbowman@alum.mit.edu>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-08-11 20:34:04 +01:00
Adam Turner
d03156e078 Format `tests/` (#12760) 2024-08-11 14:58:56 +01:00
Adam Turner
a4102a7507 Specify encoding to avoid EncodingWarning 2024-07-29 18:21:01 +01:00
Adam Turner
7c4db269af Normalise `sys.path` manipulation in tests (#12665) 2024-07-23 16:55:21 +01:00
Adam Turner
217f267822 Do not overwrite user-supplied data by default when copying (#12647) 2024-07-22 16:00:16 +01:00
Bénédikt Tran
6c486a575c Fix detecting file changes for the overwritten file warning (#12627)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-20 14:31:53 +01:00
Adam Turner
2bd973e719 autodoc: Fix warnings with dataclasses in `Annotated` metadata (#12622) 2024-07-20 11:28:03 +01:00
Adam Turner
587da413ca Warn when files are overwritten in the build directory (#12612) 2024-07-19 08:20:48 +01:00
Adam Turner
e61f56950d Do not add the module prefix when generating autosummary documents (#12609) 2024-07-17 21:42:21 +01:00
Jean-François B.
152b78318d LaTeX: fix figures in seealso and seealso inside table cell (#12598)
This also fixes unreported issues unrelated to the 7.4.0 release:

- (now old style "lightbox") admonitions render badly in tabulary,
- "heavybox" admonitions (they are all now but warning et al. were already) cause PDF crash if in tabulary and rendered badly if in tabular or longtable.
- figure in a table cell is not properly separated from immediately preceding text.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-16 21:03:42 +01:00
Adam Turner
4bdef1b576 Remove old-styled `source_suffix` values in tests 2024-07-15 12:50:56 +01:00
Adam Turner
18ac58bd53 Fix possibly-invalid HTML when a rubric node is manually created 2024-07-15 10:04:48 +01:00
Bénédikt Tran
2a30bb661f Fix PEP 695 output for classes in the LaTeX builder (#12561) 2024-07-15 05:17:36 +01:00
Chris Sewell
41b363dbff [rst] Add level option to rubric directive (#12506)
This commit adds a `level` option to the `rubric` directive, which propagates a `level` attribute to the `rubric` node,
and allows renderers to select a specific heading level.

Logic for this attribute has been added to the HTML5 and LaTeX builder.
2024-07-14 05:52:58 +02:00
Jakob Lykke Andersen
e08f12f848 toctree: Use document nesting instead of domain nesting when adding domain objects (#12367)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-14 01:16:26 +01:00
Trevor Bekolay
2c0943784c Disallow module cycles in autosummary (#6792)
Consider the following piece of reST::

  .. automodule:: sphinx.ext.autosummary
     :members:

     .. autosummary::

        sphinx.ext.autosummary.Autosummary

This inserts an autosummary after the module docstring, but before
the members of the module. Without the change in this commit, this
would fail because `import_by_name` would attempt to import::

    sphinx.ext.autosummary.sphinx.ext.autosummary.Autosumary

because the prefix (from the parent) is `sphinx.ext.autosummary`,
and the name is `sphinx.ext.autosummary.Autosummary`, which is able
to be imported from `sphinx.ext.autosummary`, but is not the way
that anyone would want to refer to it.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-13 06:37:50 +01:00
James Addison
a6c2bdd371 Rename template files in Sphinx to use the `.jinja` extension (#12364) 2024-07-11 12:31:35 +01:00
Ashley Whetter
e38a60d3f2 Add `py:type` directive and role for documenting type aliases (#11989)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-11 12:15:54 +01:00
Stephen Finucane
6b37a6b2a2 Allow explicitly specifying modules in the coverage builder (#11592)
Currently there is no mechanism to identify totally undocumented modules
in the coverage builder, unlike with partially documented modules.
Resolve this by introducing a new ``coverage_modules`` config option.
This is a list of modules that should be documented somewhere
within the documentation tree. 
Any modules that are specified in the configuration value but 
are not documented anywhere will result in a warning. 
Likewise, any modules that are not in the config option but 
are documented somewhere will result in a warning.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2024-07-11 07:36:36 +01:00
Adam Turner
82edc3d385 Rewrite `usage/configuration.rst` (#12537)
- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive
2024-07-10 21:43:14 +01:00
tuncbkose
bdd9140842 Remove custom SVG processing in the HTML builder (#12425)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-10 18:31:01 +00:00
James Addison
778013f91a Regression: restore extraction of data-URI images from source for builders whose output formats do not support them natively (#12344) 2024-07-03 02:16:43 +01:00
Nicolas Peugnet
ac3f74a3e0 [tests] Add intl regression test for term not found warning (#12388)
Add test for term not found warning in test_intl to prevent future regressions
2024-05-19 12:14:13 +02:00