summaryrefslogtreecommitdiff
path: root/sphinx/ext/viewcode.py
Commit message (Collapse)AuthorAgeFilesLines
* Unescape quotation marks where possibleAdam Turner2023-02-181-1/+1
|
* Fix COM812Adam Turner2023-02-181-1/+1
|
* Resolve Ruff SIM114 violationsAdam Turner2023-02-151-4/+3
|
* Move console output utilities to ``sphinx.util.display``Adam Turner2023-01-031-1/+2
| | | | | - Merge `old_status_iterator` into ``status_iterator``. ``old_status_iterator`` was deprecated in version 1.6.
* Run pyupgrade (#11070)Adam Turner2023-01-021-4/+3
|
* Use PEP 604 typesAdam Turner2023-01-011-3/+3
|
* Use PEP 595 typesAdam Turner2023-01-011-4/+4
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Update typing ignores for mypy 0.990Adam Turner2022-11-131-4/+4
|
* Run the ``pyupgrade`` toolAdam Turner2022-10-171-1/+1
|
* Fix highlighting lexersAdam Turner2022-09-251-1/+1
| | | | - Ensure `pycon3` is always normalised to `pycon`
* Remove deprecated code for Sphinx 5.0Adam Turner2022-04-171-15/+0
|
* 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-3/+3
| | | | | | | | 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.
* Fix #9210: viewcode: crashed if non importable modules found on parallel buildTakeshi KOMIYA2021-05-121-4/+5
|
* refactor: Use PEP-526 based variable annotationTakeshi KOMIYA2021-04-081-1/+1
|
* Fix #8933: viewcode: Failed to create back-links on parallel buildTakeshi KOMIYA2021-02-261-1/+8
| | | | | | | | On parallel build mode, viewcode losts the back-links information on gathering results from each process. As a result, some back-links are missing in the generated viewcode pages. This fixes the merging back-links process for parallel builds.
* Sometimes _viewcode_modules can be False; don't crash when it isDustin Spicuzza2021-02-151-1/+5
| | | | - Fixes #8880
* Fix #8756: viewcode: highlighted code is generated even if not referencedTakeshi KOMIYA2021-01-251-0/+13
| | | | | viewcode does not purge unreferenced modules on incremental build. This adds env-purge-doc handler to clean them.
* Fix #8704: viewcode: anchors are generated in incremental buildTakeshi KOMIYA2021-01-221-13/+51
| | | | | | | | | | | The anchors for viewcode was generated in the reading phase only if supported builder is used. It causes anchors are missing on the incremental build after the build for non supported builder. This introduces `viewcode_anchor` node to insert the anchor even if non supported builders. They will be converted to the anchor tag in the resolving phase for supported builders. Or, they will be removed for non supported builders.
* Fix #8720: viewcode: module pages are generated for epub on incremental buildTakeshi KOMIYA2021-01-221-0/+4
| | | | | | | The module pages should be generated for epub only if enabled via configuration. But they are generated after the build for other viewcode-supported builders. This checks the current builder on generating module pages.
* refactor: viewcode: Fix type annotationsTakeshi KOMIYA2021-01-191-4/+4
|
* Merge pull request #8698 from tk0miya/8681_viewcode_incremental_buildTakeshi KOMIYA2021-01-191-1/+40
|\ | | | | Close #8681: viewcode: Support incremental build
| * Close #8681: viewcode: Support incremental buildTakeshi KOMIYA2021-01-191-1/+40
| | | | | | | | | | Now viewcode supports incremental build. It generates HTML files only when the original python code is updated from last build.
* | refactor: viewcode: Use a constant for dirnameTakeshi KOMIYA2021-01-181-7/+12
|/
* 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
* Sort imports with isortFrançois Freitag2020-11-111-1/+0
| | | | | | | | | | | | 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.
* Revert "viewcode: Fix viewcode raises NoUri error on resolving phase except ↵Takeshi KOMIYA2020-06-261-4/+2
| | | | | | | | on HTML builders" This reverts commit c2ef1ad7e507c86442eae76e1ad7182383e13c8d. The error was completely resolved by #7683. So this is no longer needed.
* viewcode: Fix viewcode raises NoUri error on resolving phase except on HTML ↵Takeshi KOMIYA2020-05-171-2/+4
| | | | builders
* Merge branch '2.x' into 3.xTakeshi KOMIYA2020-02-181-1/+1
|\
| * Fix #7137: viewcode: Avoid to crash when non-python code givenTakeshi KOMIYA2020-02-181-1/+1
| |
* | refactor: Update type annotations in sphinx.ext.*Takeshi KOMIYA2020-02-161-3/+5
| |
* | Merge branch '2.0'Takeshi KOMIYA2020-01-011-1/+1
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2020-01-011-1/+1
| |
* | Merge branch '2.0'Takeshi KOMIYA2019-07-061-18/+12
|\ \ | |/
| * Migrate to py3 style type annotation: sphinx.ext.viewcodeTakeshi KOMIYA2019-07-041-20/+14
| |
| * Show deprecation warning for viewcode_importTakeshi KOMIYA2019-03-301-0/+1
| |
* | Drop features and APIs deprecated in 1.8Takeshi KOMIYA2019-03-301-10/+0
|/
* Give "nonl=True" value to logging.info() instead of intTakeshi KOMIYA2019-01-191-3/+0
|
* Make info messages more translatableTakeshi KOMIYA2019-01-091-2/+2
|
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Merge pull request #5805 from jdufresne/has-tag-strTakeshi KOMIYA2018-12-171-6/+1
|\ \ | | | | | | Remove unnecessary bytes/str type check from doctree_read()
| * | Remove unnecessary bytes/str type check from doctree_read()Jon Dufresne2018-12-161-6/+1
| | | | | | | | | | | | ModuleAnalyzer.code is always type str. Decoding is unnecessary.