summaryrefslogtreecommitdiff
path: root/sphinx/environment/adapters/toctree.py
Commit message (Collapse)AuthorAgeFilesLines
* Unescape quotation marks where possibleAdam Turner2023-02-181-1/+1
|
* Fix COM812Adam Turner2023-02-181-1/+1
|
* Cache doctrees more efficientlyAdam Turner2023-01-041-1/+1
|
* Cosmetic refactor of ``_entries_from_toctree``Adam Turner2023-01-021-29/+22
|
* Add faster ``TocTree._toctree_copy`` method (#10988)hofmandl12023-01-021-25/+28
| | | | | | | | | | | | | As in the standalone html builder the navigation is flattened out for every single html page, the code needs to create a specialised toctree for every html page. Previously this was done by deep-copying the complete navigation toctree and then stripping out the parts not needed on the particular page. With this change the code only (deep)-copies the needed parts of the toctree avoiding unnecessary copying and throwing-away. The performance improvements seems to be smaller for smaller page counts and get bigger the more pages are involved. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Run pyupgrade (#11070)Adam Turner2023-01-021-4/+4
|
* Use PEP 604 typesAdam Turner2023-01-011-3/+3
|
* Use PEP 595 typesAdam Turner2023-01-011-8/+8
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Update typing ignores for mypy 0.990Adam Turner2022-11-131-1/+1
|
* Drop Python 3.7Adam Turner2022-09-271-2/+2
|
* Make toctree accept special docnames (#10673)Brecht Machiels2022-09-121-1/+12
| | | | | | 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>
* Update include_patterns implementation (#10680)Adam Turner2022-07-231-1/+4
|
* Improve static typing strictness (#10569)danieleades2022-07-181-1/+1
|
* Add `include_patterns` as the opposite of `exclude_patterns` (#10518)Adam Turner2022-07-171-1/+1
|
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* Migrate to Node.findall() from Node.traverse()Takeshi KOMIYA2022-01-031-6/+6
| | | | | | | | Node.traverse() was marked as deprecated since docutils-0.18. Instead of it, Node.findall() has been added as successor of traverse(). This applies a patch to docutils-0.17 or older to be available Node.findall() and use it.
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* Support docutils-0.18: Consume iterator of Element.traverse()Takeshi KOMIYA2021-10-271-2/+2
| | | | | | | Since 0.18, Element.traverse() returns an iterator instead of intermediate object. As a result, the return value is always considered as truthy value. And it becomes fragile when the caller modifies the doctree on the loop.
* refactor: Add Optional to type annotationsTakeshi KOMIYA2021-05-101-1/+1
|
* refactor: Add Optional to type annotationsTakeshi KOMIYA2021-05-031-2/+2
|
* Merge pull request #9053 from tk0miya/title_node_for_toctree_captionTakeshi KOMIYA2021-04-091-1/+1
|\ | | | | Fix #8870: Use title node for the caption of toctree
| * Fix #8870: Use title node for the caption of toctreeTakeshi KOMIYA2021-04-091-1/+1
| | | | | | | | | | Since docutils-0.17, the caption node should not use for the non-figure nodes. Therefore, this replaces it by the title node.
* | refactor: Use PEP-526 based variable annotation (sphinx.environment)Takeshi KOMIYA2021-03-251-4/+4
| |
* | Close #8326: Rename master_doc to root_docTakeshi KOMIYA2021-02-281-1/+1
| | | | | | | | | | | | To describe the purpose more accurately, the `master_doc` is now renamed to `root_doc`. The old name is still available. But it is recommeneded to use new one from now on.
* | Merge branch '3.x'Takeshi KOMIYA2021-01-161-1/+3
|\ \ | |/
| * Deal with empty string case.Jean Kossaifi2021-01-091-1/+1
| |
| * Cast maxdepth to int in toctreeJean Kossaifi2021-01-091-0/+2
| | | | | | | | When specifying the max-depth for the toctree in theme.conf that isn't automatically cast to int, causing a hard to locate error.
* | Merge branch '3.x'Takeshi KOMIYA2021-01-011-1/+1
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | .. 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
* | Merge branch '3.x'Takeshi KOMIYA2020-11-121-3/+2
|\ \ | |/
| * Sort imports with isortFrançois Freitag2020-11-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch '3.x'Takeshi KOMIYA2020-04-131-1/+1
|\ \ | |/
| * Fix #7410: Allow to suppress "circular toctree references detected" warningsTakeshi KOMIYA2020-04-121-1/+1
| |
* | Hello TYPE_CHECKING!Takeshi KOMIYA2020-03-071-3/+2
|/
* refactor: Rename var keyword argument to "**kwargs"Takeshi KOMIYA2020-01-081-7/+7
|
* A happy new year!Takeshi KOMIYA2020-01-011-1/+1
|
* mypy: Enable disallow_incomplete_defs flag for type checkingTakeshi KOMIYA2019-12-301-3/+3
|
* Replace `a and b or c` by the more legible `b if a or c`.Antony Lee2019-12-211-1/+1
|
* Migrate to py3 style type annotation: sphinx.environment.adapters.toctreeTakeshi KOMIYA2019-07-061-26/+24
|
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-8/+7
| |
* | Add 'type: ignore' to avoid type errorsTakeshi KOMIYA2018-12-151-1/+1
| |
* | Add docutils-stubs to test depsTakeshi KOMIYA2018-12-151-2/+2
| |