Adam Turner
6e4c4f11eb
Enable automatic formatting for `sphinx/application.py
`
2024-12-11 00:27:24 +00:00
Adam Turner
f15976a427
Fix type annotations for 'env-merge-info' callbacks
2024-12-04 19:09:24 +00:00
Adam Turner
3930a1ce10
Use the _StrPath proxy for sphinx.application
2024-11-27 00:24:16 +00:00
Adam Turner
3b5bce906c
Use `_StrPath
in
sphinx.application
`
2024-10-26 00:12:12 +01:00
Adam Turner
116a430cac
Accept PathLike
in Sphinx.add_message_catalog()
2024-10-25 22:49:51 +01:00
Adam Turner
bf77a4087a
Use `_StrPath
in
sphinx.util.i18n
` ( #13050 )
2024-10-20 22:03:24 +01:00
Adam Turner
cb5318bdc8
Use `_StrPath
in
sphinx.theming
` ( #13048 )
2024-10-20 20:15:42 +01:00
Adam Turner
e58dd58f35
Enable the PLR6201 lint in Ruff
2024-10-19 19:05:43 +01:00
danieleades
cf8f140dd8
Shrink mypy whitelist ( #12900 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-05 21:37:05 +01:00
Adam Dangoor
9a36cfcd0f
Enable `disallow_any_generics
for
sphinx.ext.napoleon
` ( #12911 )
2024-09-23 06:15:00 +01:00
Adam Dangoor
cb455ddada
Add per-event overloads to `Sphinx.connect()
` ( #12784 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-08-15 21:49:50 +01:00
Adam Turner
fadb6b10cb
Stop exiting early with `--fail-on-warnings
; add
--exception-on-warning
` ( #12743 )
...
Co-authored-by: Jeremy Maitin-Shepard <jbms@google.com>
2024-08-13 17:12:42 +01:00
Adam Turner
b511537597
`_StrPath
is dead; long live
_StrPath
` ( #12690 )
2024-07-26 17:33:55 +01:00
Adam Turner
f31dbabf20
Remove `_StrPath
` ( #12650 )
2024-07-22 16:22:41 +01:00
Adam Turner
9e3f4521db
Drop support for Python 3.9 ( #12633 )
2024-07-22 15:05:15 +01:00
danieleades
f4bb9ca112
Shrink the mypy whitelist: `sphinx.application
` ( #12568 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-15 03:04:10 +01:00
Adam Turner
063c97304d
Simplify the type of configuration value descriptions ( #12553 )
...
There's no real reason to have the empty string as a description,
and hence we can just make the type ``str`` rather than a union.
2024-07-13 07:35:39 +01:00
Chris Sewell
78c8b4d323
Add optional description
argument to app.add_config_value
( #12549 )
...
Sphinx (+ extensions) has a lot of available configuration variables for users,
allowing for the co-location of a short description on the configuration value,
can be utilised by external tools to provide better sphinx authoring support.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-12 19:40:36 +02:00
M Bussonnier
602bfe4255
Bump `types-docutils
` to 0.21.0.20240711 ( #12529 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-11 06:55:58 +01:00
Adam Turner
d2f1acc0ca
Simplify `Tags
` ( #12490 )
...
- Use a set to store the list of tags
- Cache evaluated expressions
- Extract locally-defined function into a private method
2024-06-29 10:21:23 +01:00
Chris Sewell
f0dc8239cd
[app] Allow extensions to detect freshenv builds ( #12358 )
...
Some extensions cache data outside of the `BuildEnvironment` (usually for memory/performance reasons).
For these extensions, it would be helpful to detect when `sphinx-build -E` has been called, which in essence suggests the user wishes to remove cached data before building.
This commit adds the `Sphinx.fresh_env_used` public property, exposing `Sphinx._fresh_env_used` in an immutable manner.
2024-06-03 12:01:10 +02:00
Nicolas Peugnet
18d30343f2
i18n: Fix loading custom template translations for en ( #12220 )
...
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-05-15 07:11:21 +02:00
Adam Turner
6514a86f43
Enable the G002 check
2024-04-22 23:09:01 +01:00
Bénédikt Tran
cb8a28dd7e
[mypy] add stubs for color functions ( #12217 )
2024-04-01 13:45:47 +02:00
Adam Turner
17c1aa76c6
Add type hints to untyped definitions
2024-01-13 21:23:48 +00:00
Adam Turner
efd24cf4ca
Defer computation of configuration values ( #11855 )
2024-01-04 02:23:45 +00:00
Adam Turner
259118d182
Narrow the type for configuration option 'valid_types' values
2024-01-03 21:51:39 +00:00
Adam Turner
19b2950511
Narrow the type for configuration option 'rebuild' values
2024-01-03 04:17:46 +00:00
Adam Turner
6b17dd1b28
Support string methods on path objects ( #11619 )
2023-08-23 19:33:56 +01:00
Adam Turner
0c22d9c9ff
Restore hidden pass-through calls when adding asset files
2023-08-17 15:48:43 +01:00
Adam Turner
08dbaa793e
Fix SIM117 (use single 'with' statement)
2023-08-14 00:18:13 +01:00
Adam Turner
9bcf1d8bb3
Fix TCH001 (move application import into a type-checking block)
2023-08-14 00:18:13 +01:00
Adam Turner
36012b7d96
Fix TCH002 (move third-party import into a type-checking block)
2023-08-13 22:50:03 +01:00
Adam Turner
d80eab689d
Fix EM10{1,2} (exception must not use a string)
2023-08-13 22:11:15 +01:00
Adam Turner
1dcc112608
Fix B006 (Do not use mutable data structures for argument defaults)
2023-08-13 22:11:15 +01:00
Adam Turner
92e60b3f15
Fix PGH003 (type: ignore comment must have parameters)
2023-08-13 22:11:15 +01:00
Adam Turner
fa17437254
Remove hidden pass-through calls when adding asset files
...
``Sphinx.add_css_file()`` called ``Builder.add_css_file()``
and``Sphinx.add_js_file()`` called ``Builder.add_js_file()``.
2023-08-12 08:50:33 +01:00
Adam Turner
49d8304670
Start using `pathlib.Path
and deprecate
sphinx.testing.path
` ( #11526 )
2023-07-28 00:39:12 +01:00
Adam Turner
cb6d568715
Enable `strict-optional
` for several more modules ( #11523 )
...
This enables mypy's ``strict-optional`` mode for:
* ``sphinx.builders.html``
* ``sphinx.builders.latex``
* ``sphinx.domains.python``
* ``sphinx.domains.std``
* ``sphinx.environment``
* ``sphinx.ext.apidoc``
* ``sphinx.ext.autodoc``
* ``sphinx.ext.autodoc.importer``
* ``sphinx.ext.autosummary``
* ``sphinx.ext.autosummary.generate``
* ``sphinx.ext.inheritance_diagram``
* ``sphinx.ext.intersphinx``
* ``sphinx.ext.imgmath``
* ``sphinx.ext.mathjax``
* ``sphinx.ext.napoleon.docstring``
* ``sphinx.registry``
* ``sphinx.writers.latex``
2023-07-27 20:17:35 +01:00
danieleades
f06ef37017
shrink mypy whitelist for `sphinx.application
` ( #11395 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-23 17:47:01 +01:00
Adam Turner
c73628dfca
Accept a version tuple in `app.require_sphinx()
`
2023-05-11 13:50:45 +01:00
Adam Turner
a464c5851d
Make the `env
argument to
Builder
` subclasses required ( #11379 )
2023-04-28 10:25:57 +01:00
Adam Turner
616ba29f28
Harmonise references to Sphinx versions ( #11361 )
2023-04-27 01:02:09 +01:00
Adam Turner
7ecf037280
Enable 'nit-picky mode' for Sphinx's documentation
...
Fix several reference errors throughout the documentation and set
``nitpick_ignore`` in ``doc/conf.py``.
2023-04-06 23:11:39 +01:00
Adam Turner
15553da9c8
Resolve lint errors from Ruff 0.0.260
2023-03-31 17:52:51 +01:00
Dimitri Papadopoulos
669bcc0a19
Fix typos found by codespell
2023-03-27 07:22:07 +02:00
Adam Turner
c7d7f2951d
Remove `sphinx.locale.setlocale
`
2023-03-24 01:30:44 +00:00
Adam Turner
69066d0bb7
Split `sphinx.application.builtin_extensions
` into groups
...
This is a preparatory step for when eventually the ``sphinxcontrib``
extensions are no longer loaded by default.
2023-03-17 21:22:19 +00:00
Adam Turner
c8f4a03dac
Fix COM812
2023-02-18 01:58:05 +00:00
Adam Turner
8c5e7013ea
Move console output utilities to `sphinx.util.display
`
...
- Merge `old_status_iterator` into ``status_iterator``.
``old_status_iterator`` was deprecated in version 1.6.
2023-01-03 18:37:20 +00:00