Adam Dangoor
d2627c44f3
Remove type check overrides for `tests/test_extensions/test_ext_githubpages.py
` ( #13306 )
2025-02-07 14:43:27 +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
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
Adam Turner
0d4425ce07
Use read-only test roots ( #13285 )
2025-01-31 18:04:36 +00:00
Adam Turner
82e9182d43
Initial implementation of an `_Inventory
` type ( #13275 )
2025-01-29 00:46:08 +00:00
Adam Turner
56e52fcdbe
Fix type error in mocking `_fetch_inventory
` ( #13274 )
2025-01-29 00:04:46 +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
7406d4222f
Move mypy test module exclusions to per-module ignores ( #13265 )
2025-01-26 19:41:15 +00:00
Adam Turner
ca2ab35d94
Add further types to `_INVALID_BUILTIN_CLASSES
` ( #13263 )
2025-01-23 03:53:25 +00:00
Adam Turner
ea5fc5957a
Add `pathlib
types to
_INVALID_BUILTIN_CLASSES
` ( #13261 )
2025-01-23 03:26:35 +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
Adam Turner
4b1d64d1e5
Use `app.build(force_all=True)
`
2025-01-18 18:38:59 +00:00
Adam Turner
31de02cc52
Bump Ruff to 0.9.2 ( #13250 )
2025-01-18 00:35:09 +00:00
Adam Turner
e5131ba1bd
intersphinx: Create an `_InventoryItem
` type ( #13248 )
2025-01-17 00:41:11 +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
a56fdad70b
Use `sphinx._cli.util.colour
in
sphinx.util.console
` ( #13241 )
2025-01-16 16:57:28 +00:00
Adam Turner
4fbcc2098e
intersphinx: Import names from proper places ( #13244 )
2025-01-15 21:41:34 +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
72ce43619c
Remove unneeded runtime typing imports ( #13233 )
2025-01-12 01:04:14 +00:00
Adam Turner
74ec220479
apidoc: Rename test roots
2025-01-07 11:06:29 +00:00
Adam Turner
8732b2324a
Split out `sphinx.ext.apidoc._generate
`
2025-01-07 08:33:20 +00:00
Adam Turner
2bd70193b7
Split out `sphinx.ext.apidoc._cli
`
2025-01-07 08:32:11 +00:00
Adam Turner
47599df1bc
apidoc: Add `--automodule-options
`
2025-01-07 08:05:20 +00:00
Adam Turner
df06e6d628
Add `InventoryFile.loads()
` ( #13215 )
2025-01-07 00:40:57 +00:00
Adam Turner
5ff3740063
Adapt tests for Pygments 2.19
2025-01-06 06:56:10 +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
Adam Turner
83bf866059
Avoid attribute indirection with `env
` ( #13212 )
2025-01-05 09:10:55 +00:00
Adam Turner
849d309db4
Napoleon: Use `:py:{...}
` in type preprocessing
2025-01-05 02:13:15 +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
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
e65bbb96ae
Create a new type for the current document's environment state ( #13151 )
2025-01-04 00:28:03 +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
3028e818c9
Remove test skips for Python 3.14 ( #13041 )
2025-01-03 07:31:40 +00:00
Adam Turner
00ad109a39
Run Ruff on `tests/roots/
`
2025-01-03 01:33:14 +00:00
Adam Turner
2aad3a87f4
Enable the entire Q category in Ruff
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
51bbfe259e
Avoid using camelCase names in napoleon tests
2024-12-09 14:59:36 +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
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