Tim Hoffmann
d40840ebf1
Slightly simplify toctree code ( #12724 )
2024-08-09 21:22:12 +01:00
Adam Turner
772cdfa19d
Remove `sphinx.directives.other.VersionChange
` ( #12662 )
2024-07-23 14:56:49 +01:00
Adam Turner
de15d61a46
Use pathlib in `sphinx.project
`
2024-07-23 04:52:32 +01:00
danieleades
e8f8247e0c
Disallow subclassing `Any
` ( #12638 )
2024-07-23 01:52:20 +01:00
Tim Hoffmann
a95d716f7f
Add a class option to the toctree directive ( #12524 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-10 11:07:49 +01:00
Adam Turner
1887df0b5c
Add reStructuredText parsing functions to `SphinxDirective
` ( #12492 )
2024-07-02 22:14:19 +01:00
danieleades
22cee42094
[lint] use `types-docutils
instead of
docutils-stubs
for
docutils
` type annotations ( #12012 )
...
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-23 21:09:18 +01:00
Chris Sewell
d59b158371
👌 Make ExtensionMetadata
type public and use it in internal extensions ( #12153 )
...
This type alias has now been fully documented for public consumption.
This will be beneficial to the sphinx ecosystem,
to aide/encourage extension developers to provide the correct metadata.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-21 16:19:26 +01:00
danieleades
f9c8943889
Use `# NoQA
` consistently ( #11903 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-01-21 20:20:58 +00:00
danieleades
f7fbfaa471
Enable various pydocstyle (D) rules ( #11878 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-01-14 21:13:46 +00:00
Adam Turner
f8e8b4745e
Enable ANN001, ANN102, ANN202
2024-01-14 02:50:25 +00:00
Adam Turner
ff18318613
Add an `'include-read'
` event ( #11657 )
2023-08-30 22:21:16 +01:00
Dmitry Shachnev
3e943d9e79
Resolve all paths in the include directive ( #11650 )
...
Because pytest's base tmp_path is also in /tmp, ``source`` here is relative path,
and thus is not properly converted to doc name.
So the test fails because `sources_reported` dict has a key like
``../../../pytest/pytest-0/directive-include/baz/baz``,
and ``assert "baz/baz" in sources_reported`` fails.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-28 04:33:42 +00:00
Kyle Sunden
8512855776
Fix signature of docutils include_source monkeypatch ( #11610 )
2023-08-17 17:31:53 +01:00
Halldor Fannar
0bad447070
Emit "source-read" events for files read via the `include
` directive ( #11510 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: picnixz <10796600+picnixz@users.noreply.github.com>
2023-08-14 16:02:04 +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
6f5a99a05d
Refactor `sphinx.environment.adapters.TocTree
` ( #11565 )
2023-08-09 15:43:26 +01:00
Adam Turner
6c56988979
Unescape quotation marks where possible
2023-02-18 02:16:50 +00:00
Adam Turner
4032070e81
Run pyupgrade ( #11070 )
2023-01-02 00:01:14 +00:00
Adam Turner
26f79b0d2d
Use PEP 595 types
2023-01-01 20:48:38 +00:00
Adam Turner
f4c8a0a68e
Insert `from __future__ import annotations
`
2023-01-01 20:48:37 +00:00
Daniel Eades
1abb24e309
remove blanket 'noqas'
2022-12-16 16:50:24 +01:00
Adam Turner
4660b62de0
Drop Python 3.7
2022-09-27 18:31:47 +01:00
Brecht Machiels
d924acfdb9
Make toctree accept special docnames ( #10673 )
...
The `.. toctree::` directive now supports the reserved special docnames
'genindex', 'modindex', and 'search'.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-09-12 20:13:14 +01:00
Adam Turner
e3337c78c6
Update include_patterns implementation ( #10680 )
2022-07-23 21:19:35 +01:00
danieleades
a504ac6100
Improve static typing strictness ( #10569 )
2022-07-18 22:08:16 +01:00
Adam Turner
490a8a9162
Add include_patterns
as the opposite of exclude_patterns
( #10518 )
2022-07-17 21:44:33 +01:00
Adam Turner
cbe0c99181
rawsource
is deprecated in docutils.nodes.Text
2022-04-22 04:21:38 +01:00
Adam Turner
6bb7b891a1
Remove copyright and licence fields
2022-02-20 03:06:23 +00:00
Adam Turner
5694e0ce60
Fix module docstring indentation
2022-02-20 00:35:13 +00:00
Adam Turner
6b8bccec59
Remove module titles in docstrings
2022-02-19 23:17:29 +00:00
Daniel Eades
6697ed62ed
address some unused loop control variables (B007)
2022-01-12 20:19:18 +00:00
Takeshi KOMIYA
b84771dcd2
A happy new year!
2022-01-01 18:45:03 +09:00
Takeshi KOMIYA
22bec4ffe4
Fix #9623 : Separate warning type 'toc.not_readable' to 'toc.excluded'
2021-11-10 01:43:59 +09:00
Takeshi KOMIYA
ca146ac18b
Close #9623 : Allow to suppress warnings on excluded document found in toctree
2021-09-12 19:23:19 +09:00
Takeshi KOMIYA
5c4f741fff
Fix i18n: messages in sphinx.directives.other are not translated
2021-09-12 19:23:18 +09:00
Takeshi KOMIYA
fc2ca413ec
refactor: Use logger.warning() instead of reporter.warning()
2021-09-12 19:22:55 +09:00
Takeshi KOMIYA
555a52be82
refactor: Use PEP-526 based variable annotation (sphinx.directives)
2021-03-23 01:44:24 +09:00
Takeshi KOMIYA
a523a89663
refactor: Add a type alias for the option_spec of directives; OptionSpec
2021-03-13 17:15:12 +09:00
Takeshi KOMIYA
339ce2f894
Merge branch '3.x'
2021-01-30 11:49:08 +09:00
jfbu
a68a05533d
Fix #8072 : Directive hlist not implemented in LaTeX
...
Adds ``multicol`` LaTeX package requirement, but it is a required
part of any latex distribution.
2021-01-28 21:21:01 +01:00
Takeshi KOMIYA
4b452338f9
Merge branch '3.x'
2021-01-01 13:57:19 +09:00
Takeshi KOMIYA
f996859420
A happy new year!
...
.. note::
$ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
$ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
2021-01-01 13:40:48 +09:00
Takeshi KOMIYA
279e547860
Merge branch '3.x'
2020-11-12 02:50:43 +09:00
François Freitag
0949735210
Sort imports with isort
...
Keep imports alphabetically sorted and their order homogeneous across
Python source files.
The isort project has more feature and is more active than the
flake8-import-order plugin.
Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
2020-11-11 13:19:05 +01:00
Takeshi KOMIYA
359290b92b
Close #8201 : Emit a warning if toctree contains duplicated entries
2020-09-13 11:02:20 +09:00
Peter Bell
0000239776
Preserve backwards compatibility
2020-07-16 15:48:51 +01:00
Peter Bell
bedc00faa6
Require canonical name to be specified when calling deprecated_alias
2020-07-15 00:12:31 +01:00
Takeshi KOMIYA
a86346aca6
Remove deprecated features marked as RemovedInSphinx40Warning
2020-04-29 15:12:39 +09:00