summaryrefslogtreecommitdiff
path: root/sphinx/directives
Commit message (Collapse)AuthorAgeFilesLines
* Enable 'nit-picky mode' for Sphinx's documentationAdam Turner2023-04-061-7/+8
| | | | | Fix several reference errors throughout the documentation and set ``nitpick_ignore`` in ``doc/conf.py``.
* Resolve ``flake8-return`` errorsAdam Turner2023-02-181-9/+7
|
* Unescape quotation marks where possibleAdam Turner2023-02-181-1/+1
|
* Fix COM812Adam Turner2023-02-181-10/+10
|
* Add ``content_offset`` parameter to ``nested_parse_with_titles`` (#11147)Jeremy Maitin-Shepard2023-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Previously, ``nested_parse_with_titles`` always passed ``0`` as the input offset when invoking ``nested_parse``. When parsing the content of a directive, as is a common use case for ``nested_parse_with_titles``, this leads to incorrect source file/line number information, as it does not take into account the directive's ``content_offset``, which is always non-zero. This issue affects *all* object descriptions due to GH-10887. It also affects the ``sphinx.ext.ifconfig`` extension. The ``py:module`` and ``js:module`` directives employed a workaround for this issue, by wrapping the calls to ``nested_parse_with_title`` with ``switch_source_input``. That worked, but was more complicated (and likely less efficient) than necessary. This commit adds an optional ``content_offset`` parameter to ``nested_parse_with_titles``, and fixes callers to pass the appropriate content offset when needed. This commit eliminates the now-unnecessary calls to ``switch_source_input`` and instead specifies the correct ``content_offset``.
* De-glob mypy whitelist for 'sphinx.domains.*' (#11064)danieleades2023-01-021-3/+3
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Run pyupgrade (#11070)Adam Turner2023-01-024-4/+4
|
* Use PEP 604 typesAdam Turner2023-01-012-16/+16
|
* Use PEP 595 typesAdam Turner2023-01-014-59/+59
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-014-0/+8
|
* remove blanket 'noqas'Daniel Eades2022-12-162-2/+4
|
* Update typing ignores for mypy 0.990Adam Turner2022-11-131-1/+1
|
* Merge branch '5.x'Adam Turner2022-10-161-1/+2
|\ | | | | | | | | | | | | | | # Conflicts: # .github/workflows/main.yml # CHANGES # sphinx/__init__.py # sphinx/domains/c.py
| * Allow sections in object description directives (#10919)Adam Turner2022-10-151-1/+2
| |
* | Merge branch '5.x'Adam Turner2022-09-301-2/+9
|\ \ | |/ | | | | | | # Conflicts: # sphinx/locale/__init__.py
| * Finer grained control over domain ToC entries (#10886)Adam Turner2022-09-301-2/+9
| | | | | | | | | | - Implement `:nocontentsentry:` flag - Use `:nocontentsentry:` in docs - Add domain object table of contents configuration option
* | Increase minimum Docutils to 0.18Adam Turner2022-09-271-26/+2
| |
* | Increase minimum Docutils to 0.17Adam Turner2022-09-271-21/+20
| |
* | Drop Python 3.7Adam Turner2022-09-271-1/+1
| |
* | Merge branch '5.x'Adam Turner2022-09-232-2/+51
|\ \ | |/ | | | | | | | | # Conflicts: # setup.py # sphinx/__init__.py
| * Add contents entries for domain objects (#10807)Adam Turner2022-09-131-0/+45
| | | | | | | | | | | | | | | | | | - Add entries in the table of contents for domain objects (e.g. `py:function`, `rst:role`, etc). Supported domains are Javascript, Python, and reStructuredText. - Support content in `py:module` and `js:module` directives. - Add the `noindexentry` and `noindex` flags to more domains. - Add `toc_object_entries_show_parents` configuration setting - Update documentation and tests
| * Make toctree accept special docnames (#10673)Brecht Machiels2022-09-121-2/+6
| | | | | | | | | | | | 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>
* | Merge branch '5.x'Adam Turner2022-09-092-5/+5
|\ \ | |/ | | | | | | | | | | | | | | # Conflicts: # setup.py # sphinx/application.py # sphinx/environment/__init__.py # sphinx/ext/autodoc/directive.py # tests/test_build_html.py
| * Fix more strict static typing errors (#10681)danieleades2022-08-281-1/+1
| |
| * Fix some static typing errors (#10745)danieleades2022-08-141-4/+4
| |
* | Merge branch '5.x'Adam Turner2022-07-241-1/+1
|\ \ | |/ | | | | | | | | # Conflicts: # CHANGES # sphinx/__init__.py
| * Update include_patterns implementation (#10680)Adam Turner2022-07-231-1/+1
| |
* | Merge branch '5.x'Adam Turner2022-07-182-14/+32
|\ \ | |/ | | | | | | | | # Conflicts: # sphinx/ext/autodoc/__init__.py # sphinx/writers/html5.py
| * Improve static typing strictness (#10569)danieleades2022-07-182-14/+32
| |
* | Merge branch '5.x'Adam Turner2022-07-171-1/+1
|\ \ | |/
| * Add `include_patterns` as the opposite of `exclude_patterns` (#10518)Adam Turner2022-07-171-1/+1
| |
* | Merge branch '5.x' into masterJean-François B2022-06-301-0/+11
|\ \ | |/ | | | | | | | | | | | | Resolved merge conflicts: sphinx/ext/extlinks.py sphinx/ext/napoleon/docstring.py (and removed from the latter a now unused import for flake8 F401 compliance)
| * Ensure ObjectDescription signature nodes include line numbers (#10249)Jeremy Maitin-Shepard2022-06-231-0/+11
| | | | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* | Remove deprecated items for Sphinx 6.0 (#10471)Adam Turner2022-06-161-40/+2
|/
* `rawsource` is deprecated in `docutils.nodes.Text`Adam Turner2022-04-221-1/+1
|
* Fix #10318: literalinclude: :prepend: option working with :dedent:Takeshi KOMIYA2022-04-021-2/+2
| | | | | It will always be warned because prepending is processed before dedenting. This changes the order of processing options.
* Merge branch '4.x'Takeshi KOMIYA2022-03-194-33/+1
|\
| * Collapse single line docstringsAdam Turner2022-02-201-2/+1
| |
| * Remove copyright and licence fieldsAdam Turner2022-02-204-18/+0
| |
| * Fix module docstring indentationAdam Turner2022-02-204-8/+8
| |
| * Fix module docstring first lineAdam Turner2022-02-201-2/+1
| |
| * Remove module titles in docstringsAdam Turner2022-02-194-12/+0
| |
* | Merge branch '4.x'Takeshi KOMIYA2022-01-172-2/+2
|\ \ | |/
| * Merge pull request #10078 from ↵Takeshi KOMIYA2022-01-162-2/+2
| |\ | | | | | | | | | | | | danieleades/refactor/unused-loop-control-variables address some unused loop control variables
| | * address some unused loop control variables (B007)Daniel Eades2022-01-122-2/+2
| | |
* | | Merge branch '4.x'Takeshi KOMIYA2022-01-161-3/+3
|\ \ \ | |/ /
| * | code-block: Pass list of strings ends with CR code to dedent_lines()Takeshi KOMIYA2022-01-151-3/+3
| | |
| * | Merge branch '4.x' into HEADTakeshi KOMIYA2022-01-154-27/+40
| |\ \ | | |/
| * | Fix: 9636: code-block: Do not remove newlines with :dedent:Latosha Maltba2021-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | If the option :dedent: (without numeric argument) was given to code-block then all newlines where striped from the resulting code. Preserve newlines when stripping common whitespace at the beginning of code blocks.
| * | code-block: Handle ``0`` as numeric argument in :dedent:Latosha Maltba2021-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to how Python converts ints to bool the numeric argument ``0`` to the :dedent: option of the code-block directive was handled like if no argument was given to :dedent:. Check properly for None in the options argument processing, so ``0`` is treated as numeric argument to :dedent:. Bug: #9636