Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add ``content_offset`` parameter to ``nested_parse_with_titles`` (#11147) | Jeremy Maitin-Shepard | 2023-02-15 | 1 | -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``. | ||||
* | Use PEP 595 types | Adam Turner | 2023-01-01 | 1 | -3/+3 |
| | |||||
* | Insert ``from __future__ import annotations`` | Adam Turner | 2023-01-01 | 1 | -0/+2 |
| | |||||
* | Enable Ruff's pygrep-hooks checks | Adam Turner | 2022-12-29 | 1 | -1/+1 |
| | |||||
* | ifconfig: Do not use a meta node for noop | Takeshi KOMIYA | 2022-06-03 | 1 | -3/+2 |
| | |||||
* | Add a meta node to fix iteration | Adam Turner | 2022-05-31 | 1 | -1/+2 |
| | |||||
* | Remove copyright and licence fields | Adam Turner | 2022-02-20 | 1 | -3/+0 |
| | |||||
* | Conform to PEP 257 summary line conventions | Adam Turner | 2022-02-20 | 1 | -1/+3 |
| | |||||
* | Fix module docstring indentation | Adam Turner | 2022-02-20 | 1 | -9/+9 |
| | |||||
* | Fix module docstring first line | Adam Turner | 2022-02-20 | 1 | -2/+1 |
| | |||||
* | Remove module titles in docstrings | Adam Turner | 2022-02-19 | 1 | -3/+0 |
| | |||||
* | Migrate to Node.findall() from Node.traverse() | Takeshi KOMIYA | 2022-01-03 | 1 | -1/+1 |
| | | | | | | | | 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 KOMIYA | 2022-01-01 | 1 | -1/+1 |
| | |||||
* | refactor: Add a type alias for the option_spec of directives; OptionSpec | Takeshi KOMIYA | 2021-03-13 | 1 | -1/+2 |
| | |||||
* | A happy new year! | Takeshi KOMIYA | 2021-01-01 | 1 | -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 | ||||
* | fix typo | Tetsuo Koyama | 2020-07-19 | 1 | -1/+1 |
| | |||||
* | A happy new year! | Takeshi KOMIYA | 2020-01-01 | 1 | -1/+1 |
| | |||||
* | Migrate to py3 style type annotation: sphinx.ext.ifconfig | Takeshi KOMIYA | 2019-07-04 | 1 | -11/+7 |
| | |||||
* | Fix #6213: ifconfig: contents after headings are not shown | Takeshi KOMIYA | 2019-04-05 | 1 | -2/+2 |
| | |||||
* | Python-3-only clean ups discovered by pyupgrade | Jon Dufresne | 2019-03-17 | 1 | -1/+1 |
| | | | | | | | | | | | | | | https://github.com/asottile/pyupgrade > A tool to automatically upgrade syntax for newer versions of the > language. - Drop u str prefix - Drop base object inheritance - Drop args to super() - Use set literals - Use dict comprehension - Use set comprehension | ||||
* | Add a helper method ``SphinxDirective.set_source_info()`` | Takeshi KOMIYA | 2019-03-03 | 1 | -2/+1 |
| | |||||
* | Merge branch '1.8' | Takeshi KOMIYA | 2019-01-02 | 1 | -1/+1 |
|\ | |||||
| * | A happy new year! | Takeshi KOMIYA | 2019-01-02 | 1 | -1/+1 |
| | | |||||
* | | Remove unnecessary encoding cookie from Python source files | Jon Dufresne | 2018-12-16 | 1 | -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 KOMIYA | 2018-12-15 | 1 | -3/+2 |
| | | |||||
* | | Fix annotations for Directives (Replace N_co with nodes.Node) | Takeshi KOMIYA | 2018-12-01 | 1 | -3/+3 |
| | | |||||
* | | Fix annotations for minor methods and functions | Takeshi KOMIYA | 2018-11-30 | 1 | -2/+2 |
| | | |||||
* | | Fix annotaions for extensions | Takeshi KOMIYA | 2018-11-28 | 1 | -1/+1 |
| | | |||||
* | | Add sphinx.util.typing:unicode to help mypy-3 migration | Takeshi KOMIYA | 2018-11-24 | 1 | -0/+1 |
|/ | |||||
* | refactor: Replace Directive by SphinxDirective | Takeshi KOMIYA | 2018-05-11 | 1 | -2/+2 |
| | |||||
* | Fix mypy violations | Takeshi KOMIYA | 2018-03-24 | 1 | -1/+1 |
| | |||||
* | Revert "Use typing.TYPE_CHECKING for typehints" | Takeshi KOMIYA | 2018-03-13 | 1 | -3/+2 |
| | | | | This reverts commit a073e17537c2aacaac305feadea58d4473ec97f4. | ||||
* | Use typing.TYPE_CHECKING for typehints | Takeshi KOMIYA | 2018-02-14 | 1 | -2/+3 |
| | |||||
* | A happy new year! | Takeshi KOMIYA | 2018-01-01 | 1 | -1/+1 |
| | |||||
* | Update type annotations for new mypy | Takeshi KOMIYA | 2017-05-07 | 1 | -1/+1 |
| | |||||
* | Merge branch 'stable' | Takeshi KOMIYA | 2017-03-26 | 1 | -1/+1 |
|\ | |||||
| * | Year++ | Takeshi KOMIYA | 2017-03-26 | 1 | -1/+1 |
| | | |||||
* | | Upgrade to mypy-0.5 | Takeshi KOMIYA | 2017-03-03 | 1 | -1/+1 |
| | | |||||
* | | Remove unused "type: ignore" | Takeshi KOMIYA | 2017-02-06 | 1 | -1/+1 |
| | | |||||
* | | Fix mypy violations | Takeshi KOMIYA | 2017-01-19 | 1 | -1/+1 |
| | | |||||
* | | Add __iter__(), add() and filter() to Config class | Takeshi KOMIYA | 2017-01-17 | 1 | -1/+1 |
| | | |||||
* | | ``sphinx.util.compat.Directive`` class is now deprecated. | Takeshi KOMIYA | 2016-12-13 | 1 | -1/+1 |
| | | |||||
* | | Add type-check annotations to sphinx.ext | Takeshi KOMIYA | 2016-11-16 | 1 | -3/+11 |
|/ | |||||
* | Obligatory copyright update. | Georg Brandl | 2016-01-14 | 1 | -1/+1 |
| | |||||
* | Support PEP-440 version spec for developers. | shimizukawa | 2015-03-14 | 1 | -1/+1 |
| | |||||
* | ext: pep8 fixes | Georg Brandl | 2015-03-08 | 1 | -1/+2 |
| | |||||
* | Closes #1748: SyntaxError in sphinx/ext/ifconfig.py with Python 2.6. | shimizukawa | 2015-03-02 | 1 | -1/+1 |
| | |||||
* | Merge branch 'stable' | shimizukawa | 2015-01-17 | 1 | -1/+2 |
|\ | |||||
| * | Fixes #1686: ifconfig directive doesn't care about default config values. | shimizukawa | 2015-01-17 | 1 | -1/+2 |
| | | |||||
* | | Merge branch 'stable' | Georg Brandl | 2015-01-03 | 1 | -1/+1 |
|\ \ | |/ |