Adam Turner
b9d5d2bacc
Reduce autodoc test duration by up to four times ( #14039 )
2025-11-06 03:18:19 +00:00
Adam Turner
9eb3d7940f
Add a shared utilities module for autodoc ( #14037 )
2025-11-05 01:10:46 +00:00
Tamika Nomara and Adam Turner
245dea0911
Fix `autodoc_type_aliases when appearing in PEP 604 unions (X | Y`) ( #14007 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com >
2025-11-05 00:57:57 +00:00
Adam Turner
e3175f4477
Reorganise and rename `sphinx.ext.autodoc._importer` ( #14036 )
2025-11-04 23:00:02 +00:00
Adam Turner
f7b98a03c6
Split autodoc loader functions to a new module ( #14035 )
2025-11-04 22:38:51 +00:00
Adam Turner
796a5722e0
Combine type comment utilities into `_type_comments.py` ( #14034 )
2025-11-04 21:51:20 +00:00
Adam Turner
4d2bd1e862
Split autodoc name parsing utilities to a new module ( #14033 )
2025-11-04 21:32:15 +00:00
Adam Turner
6de23cd95e
Split autodoc signature utilities to a new module ( #14032 )
2025-11-04 20:58:56 +00:00
Adam Turner
6127d76bb4
Integrate autodoc event callbacks into importer ( #14031 )
2025-11-04 19:03:32 +00:00
Adam Turner
8ca7120987
Split out `test_ext_autodoc_typehints` ( #14027 )
2025-11-04 12:07:05 +00:00
Adam Turner
83442bee4b
Group the type alias cross-referencing test with Python domain tests ( #14021 )
2025-11-03 19:34:58 +00:00
Adam Turner
fcc9ca037d
Define and use `TEST_ROOTS_DIR` ( #14020 )
2025-11-03 16:09:48 +00:00
Adam Turner
8c86bad0ef
Remove `env` from autodoc interfaces ( #14018 )
2025-11-03 00:30:53 +00:00
Adam Turner
08c7ee36cf
Use `parent_modname and canonical_module_name` ( #14017 )
2025-11-02 23:55:47 +00:00
Adam Turner
bb6b79b671
Inline `_get_doc() into _get_docstring_lines()` ( #14016 )
2025-11-02 21:59:17 +00:00
Adam Turner
54e80f70ae
Calculate and use the `docstring_lines` attribute ( #14015 )
2025-11-02 21:40:48 +00:00
Adam Turner
48f6739838
Accept a sequence of strings in `extract_summary()` ( #14014 )
2025-11-02 21:11:40 +00:00
Adam Turner
de745a9eaa
Consolidate option spec processing into `_directive_options.py` ( #14009 )
2025-10-29 23:53:15 +00:00
Adam Turner
7993a8b36a
Use more type aliases for autodoc event listeners ( #14008 )
2025-10-29 22:37:33 +00:00
Jean-François B.
e347e59ccc
Fix #13939 : LaTeX: page break after admonition title ( #13988 )
2025-10-24 08:57:38 +02:00
Adam Turner
465b758a35
Extract `_generate_directives() from Documenter._generate()` ( #13985 )
2025-10-22 00:23:22 +01:00
Adam Turner
fdf5411c1c
Remove `DocumenterBridge` ( #13984 )
2025-10-21 19:06:53 +01:00
Adam Turner
6083b5a550
Move member merging logic from `options to _member_finder` ( #13982 )
2025-10-21 18:13:12 +01:00
Adam Turner
90192fc763
Use `_load_object_by_name()` directly ( #13978 )
2025-10-20 17:44:53 +01:00
Adam Turner
fd32eb54dc
Extract `_prepare_docstrings()` ( #13977 )
2025-10-20 16:54:45 +01:00
Adam Turner
9203f2ff3e
Avoid using `Documenter.name` ( #13975 )
2025-10-19 22:29:59 +01:00
Adam Turner
ce818389eb
Simplify `Autosummary.get_items()` ( #13974 )
2025-10-19 21:07:11 +01:00
Adam Turner
7121e990e4
Use `ModuleSpec.origin` ( #13973 )
2025-10-19 20:10:52 +01:00
Adam Turner
b5870e6904
Extract the `_docstring_source_name()` function ( #13972 )
2025-10-19 19:31:15 +01:00
Adam Turner
1156555fcc
Introduce `_AutodocAttrGetter` type ( #13971 )
2025-10-19 18:37:12 +01:00
Adam Turner
ff3e1d23e3
Use `_AutodocObjType` more consistently ( #13970 )
2025-10-19 18:23:27 +01:00
Adam Turner
a4a8accbd5
Extract `_gather_members()` ( #13968 )
2025-10-17 17:09:06 +01:00
Adam Turner
3dec8620ae
Delete `FakeDirective` in autosummary ( #13967 )
2025-10-17 16:00:00 +01:00
Adam Turner
dcfaa98e80
Remove unused items in `_documenters` ( #13963 )
2025-10-17 03:07:31 +01:00
Adam Turner
2e8cedb8b6
Remove `member_order` attributes ( #13962 )
2025-10-17 02:51:08 +01:00
Adam Turner
c58caeffd7
Treat `Documenter.indent` as a constant ( #13960 )
2025-10-17 02:08:46 +01:00
Adam Turner
f194178967
Use a new `_best_object_type_for_member()` function ( #13961 )
2025-10-17 01:56:54 +01:00
Adam Turner
a8f2b9629b
Improve various autodoc tests ( #13958 )
2025-10-16 21:30:21 +01:00
Adam Turner
e281d26b5e
Merge remaining special cases into `Documenter` ( #13959 )
2025-10-16 21:28:32 +01:00
Adam Turner
4c89a82c1d
Improve signature handling in autodoc ( #13955 )
2025-10-16 18:54:18 +01:00
Adam Turner
f224e043bc
Consolidate `format_args()` ( #13949 )
2025-10-12 14:16:57 +01:00
Adam Turner
10a7a6c569
Move property type annotation logic to importer ( #13948 )
2025-10-12 13:36:02 +01:00
Jean-François B.
90b40080ca
Trim LaTeX comment, obsolete as of latest TeXLive fontawesome6 and 7 ( #13909 )
2025-10-11 09:06:23 +02:00
ad3f3cc062
Add initial support for PEP 695 type aliases ( #13508 )
...
Signed-off-by: Martin Matous <m@matous.dev >
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com >
Co-authored-by: Jeremy Maitin-Shepard <jbms@google.com >
2025-10-10 01:41:42 +01:00
Adam Turner
22c535663e
Test with released Python 3.14
2025-10-10 00:21:35 +01:00
Adam Turner
8923f08676
Extract most docstring-related logic ( #13941 )
2025-10-09 23:15:28 +00:00
dependabot[bot]
eb99d45e0c
Bump Ruff to 0.14.0 ( #13938 )
2025-10-08 06:16:30 +01:00
Adam Turner
99e5ccb22f
Consolidate `add_content()` handling ( #13936 )
2025-10-07 01:01:42 +01:00
Jeremy Maitin-Shepard and Adam Turner
f3e8999a53
autodoc: Avoid updating `__annotations__` with parent class members ( #13935 )
...
This commit ensures that the ``__annotations__`` dict of a class is
updated only with type comment-derived annotations for direct members;
the type comment-derived annotations for parent classes are added to
those parent classes own ``__annotations__`` dicts. The inherited
member annotations are still found by ``typing.get_type_hints``.
This commit also improves the efficiency of incorporating the
annotations found by the ``ModuleAnalyzer``. Previously, each call to
``_load_object_by_name`` for a data member or attribute would result
in separately iterating over all attributes (including within
classes) found by ModuleAnalyzer for the containing module, and in
the case of classes, the containing modules of all parent classes.
For modules with many members this cost could likely be significant.
With this commit, at least for the purpose of updating
``__annotations__`` dicts, each module's attributes only processed a
single time in total.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com >
2025-10-07 00:42:42 +01:00
Adam Turner
5e0b3ef9e1
Extract directive header construction from runtime introspection ( #13931 )
2025-10-06 21:09:04 +01:00