Commit Graph

79 Commits

Author SHA1 Message Date
Adam Turner
19dfc3f5af Enable the RUF031 lint in Ruff 2024-11-30 19:22:30 +00:00
Adam Turner
2f1cd36798 Enable the RUF015 lint in Ruff 2024-11-30 19:19:34 +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
efc36ac38f Bump Ruff to 0.7.3 2024-11-14 16:40:34 +00:00
Dimitri Papadopoulos Orfanos
c427edb0bd Emend spelling errors (#13113)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-11-08 12:11:42 +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
Adam Turner
c5dce468bc Enable the PLW3201 lint in Ruff 2024-10-19 19:05:42 +01:00
Adam Turner
3920af4700 Enable the PLW0603 lint in Ruff 2024-10-19 19:05:42 +01:00
Adam Turner
c78b4c5404 Enable the PLE0704 lint in Ruff 2024-10-19 01:15:09 +01:00
Adam Turner
dc29ad1fde Format test_sphinx_admonitions() 2024-10-18 20:48:41 +01:00
Adam Turner
ed8045ceea Test on Python 3.14 (#12978) 2024-10-18 01:22:37 +01:00
Adam Turner
6c52c922e5 Support Enum signatures in Python 3.12 and 3.13 2024-10-18 00:42:21 +01:00
Adam Turner
cef2bcec36 Refactor `_EnumFormatter` 2024-10-18 00:29:03 +01:00
Adam Turner
d3956894d7 Use the non-deprecated name for EnumType 2024-10-17 23:42:21 +01:00
Adam Turner
541bf7bc67 Drop support for Python 3.10 (#13000) 2024-10-17 20:59:41 +01:00
Adam Turner
62e9606d63 Restore support for `cut_lines()` with no object type (#13015) 2024-10-12 23:14:24 +01:00
Übertreiber
cc1b13ccbf intersphinx: fix flipped use of intersphinx_cache_limit. (#12905)
Co-authored-by: Nico Madysa <nico.madysa@cern.ch>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-07 21:19:20 +01:00
danieleades
7546545876 Further improve typing in tests/ (#12816)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-03 20:17:40 +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
7487e764cb Resolve a few mypy issues in tests (#12912)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-25 08:57:11 +01:00
Adam Turner
76110c3ea0 Add `_DomainsContainer` for better static typing (#12783)
Co-authored-by: Daniel Eades <danieleades@hotmail.com>
2024-09-18 03:50:27 +01:00
Adam Dangoor
b5617c0d15 Remove unused `make_app` fixtures (#12842) 2024-08-31 07:46:38 +01:00
Bénédikt Tran
1852d0f087 intersphinx: Fix double forward slashes in inventory urls (#12807) 2024-08-22 10:11:12 +01:00
Adam Turner
0b17bb1029 Always define the builder and `testroot when using the app` fixtureture (#12775) 2024-08-12 22:34:03 +01:00
Adam Turner
03b9134ee0 Short-circuit HTTP requests in tests (#12772) 2024-08-12 03:49:58 +01:00
James Addison
655d1c7213 intersphinx: Reduce log message severity when an ambiguous target resolves to a duplicate (#12587) 2024-08-11 17:22:37 +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
Shengyu Zhang
03d684fe9f intersphinx: Handle a negative `intersphinx_cache_limit` (#12514)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-31 08:16:10 +01:00
Adam Turner
a4102a7507 Specify encoding to avoid EncodingWarning 2024-07-29 18:21:01 +01:00
Adam Turner
46671f2e10 intersphinx: Add a type for project data (#12657) 2024-07-23 23:17:58 +01:00
Adam Turner
7c4db269af Normalise `sys.path` manipulation in tests (#12665) 2024-07-23 16:55:21 +01:00
Adam Turner
1f2891530d Use `app.status and app.warning` in tests (#12663) 2024-07-23 15:35:55 +01:00
Adam Turner
57a63ea603 Use more precise last-modified times for files (#12661) 2024-07-23 14:52:31 +01:00
danieleades
58d4224227 Disallow untyped calls (#12640)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-23 02:22:58 +01:00
Bénédikt Tran
61daf1c27c intersphinx: Fix cache handling (#12087)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
2024-07-22 23:09:11 +01:00
Adam Turner
9e3f4521db Drop support for Python 3.9 (#12633) 2024-07-22 15:05:15 +01:00
Adam Turner
e174df2762 Rename `normalize_intersphinx_mapping to validate_intersphinx_mapping` (#12643) 2024-07-22 13:32:44 +01:00
Bénédikt Tran
aacca3064e Remove support for the Sphinx 0.5 `intersphinx_mapping` format (#12083)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-22 12:59:59 +01:00
Chris Sewell
dabacdf5f8 Turn `show_warning_types` on by default (#12597)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-20 21:07:06 +01:00
Adam Turner
2bd973e719 autodoc: Fix warnings with dataclasses in `Annotated` metadata (#12622) 2024-07-20 11:28:03 +01:00
Adam Turner
e61f56950d Do not add the module prefix when generating autosummary documents (#12609) 2024-07-17 21:42:21 +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
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
Thomas Fanning
6cc1177d10 Allow configuring the separator used in numbering equations (#12523)
Co-authored-by: Thomas Fanning <tom@ferb.ne.anl.gov>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-10 22:23:38 +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
M Bussonnier
6e3a191185 Bump Ruff to 0.5.1 (#12530) 2024-07-10 14:13:10 +01:00