summaryrefslogtreecommitdiff
path: root/sphinx/util
Commit message (Collapse)AuthorAgeFilesLines
* Refactor ``status_iterator``HEADmasterAdam Turner2023-05-151-14/+20
|
* Don't add colours to messagelogAdam Turner2023-05-151-1/+0
| | | | We need to remove colours later for display, so it is pointless to add them.
* Expand the mypy whitelist for 'sphinx.util' (#11406)danieleades2023-05-125-8/+8
|
* Warn on deprecated Python-specific index types (#11412)Adam Turner2023-05-091-10/+14
|
* Remove deprecated ``sphinx.util.docutils.is_html5_writer_available()`` ↵Adam Turner2023-04-281-9/+0
| | | | function (#11378)
* Removed deprecated ``sphinx.util.get_matching_files()`` function (#11373)Adam Turner2023-04-281-39/+1
|
* Remove deprecated ``sphinx.util.stemmer`` module (#11370)Adam Turner2023-04-271-62/+0
|
* Make ``locale`` required in ``sphinx.util.i18n.format_date()`` (#11366)Adam Turner2023-04-271-13/+1
|
* Remove support for the ``jsdump`` format in ``sphinx.search`` (#11365)Adam Turner2023-04-271-201/+0
|
* Revert "Support and prefer ``.jinja`` to ``_t`` for static templates ↵James Addison2023-04-231-16/+3
| | | | | (#11165)" (#11329) This reverts commit 5d13215b58f93c6be8255ef2e3e20836508c7d47.
* Support and prefer ``.jinja`` to ``_t`` for static templates (#11165)James Addison2023-04-071-3/+16
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Improve static typing in ``intersphinx`` et alAdam Turner2023-03-172-4/+9
|
* Use narrower [method-assign] instead of [assignment] (mypy 1.1.1)Jean-François B2023-03-071-4/+4
|
* Prefer ``contextlib.chdir`` to ``sphinx.util.osutil.cd``Adam Turner2023-03-051-7/+21
|
* Resolve lint errors from Ruff 0.0.254Adam Turner2023-03-051-22/+19
|
* Resolve ``flake8-return`` errorsAdam Turner2023-02-182-6/+4
|
* Fix COM812Adam Turner2023-02-1812-31/+33
|
* Add ``content_offset`` parameter to ``nested_parse_with_titles`` (#11147)Jeremy Maitin-Shepard2023-02-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | 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``.
* Refactor ``sphinx.util.images.guess_mimetype``Adam Turner2023-02-151-42/+64
|
* Resolve Ruff SIM114 violationsAdam Turner2023-02-154-39/+31
|
* Collapse ``.startswith`` and ``.endswith`` testsAdam Turner2023-02-091-1/+1
|
* Fix various Ruff errorsAdam Turner2023-01-312-2/+3
|
* Merge branch '6.1.x'Adam Turner2023-01-101-3/+22
|\ | | | | | | | | | | # Conflicts: # CHANGES # sphinx/__init__.py
| * Handle exceptions for ``get_node_source`` and ``get_node_line``Adam Turner2023-01-101-3/+7
| |
| * Restore Sphinx 5 ``nodes.Element`` copying behaviourAdam Turner2023-01-101-0/+15
| |
* | Replace deprecation tooling with module level ``__getattr__`` (#11054)Adam Turner2023-01-083-50/+61
| |
* | Adopt ``profile = "black"`` for ``isort``Adam Turner2023-01-072-10/+37
| | | | | | | | This allows using Ruff's import sorting fixers
* | Call ``hashlib`` functions with ``usedforsecurity=False``Adam Turner2023-01-061-16/+9
|/
* Suppress ``ValueError`` in ``apply_source_workaround`` (#11092)Adam Turner2023-01-051-1/+3
|
* Fix deprecation warningsAdam Turner2023-01-051-2/+3
|
* Move XML Name pattern to ``epub3``Adam Turner2023-01-031-25/+6
|
* Move exception formatting utilities to ``sphinx.util.exceptions``Adam Turner2023-01-032-69/+75
|
* Deprecate ``path_stabilize`` via ``deprecated_alias``Adam Turner2023-01-031-10/+5
|
* Move HTTP-date formatting utils to `utils.http_date`Adam Turner2023-01-032-15/+25
|
* Move console output utilities to ``sphinx.util.display``Adam Turner2023-01-032-88/+107
| | | | | - Merge `old_status_iterator` into ``status_iterator``. ``old_status_iterator`` was deprecated in version 1.6.
* De-glob mypy whitelist for 'sphinx.domains.*' (#11064)danieleades2023-01-022-2/+2
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Shrink mypy whitelist for 'util.nodes' module (#11061)danieleades2023-01-021-4/+4
|
* Use PEP 604 display for ``typing.Optional`` and ``typing.Union`` (#11072)Adam Turner2023-01-022-70/+85
|
* Use ``re`` flagsAdam Turner2023-01-022-11/+11
|
* Use ``finally`` to terminate parallel processes (#10952)Philip Meier2023-01-021-2/+1
|
* Address SIM103 lints (#11052)danieleades2023-01-023-31/+8
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Use ``any`` to find elements in iterable (#11053)danieleades2023-01-021-4/+4
|
* Run pyupgrade (#11070)Adam Turner2023-01-0217-81/+78
|
* Use PEP 604 typesAdam Turner2023-01-0121-86/+82
|
* Use PEP 595 typesAdam Turner2023-01-0121-179/+182
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-0125-1/+52
|
* Factor out HTML 4 translator (#11051)Adam Turner2022-12-301-2/+2
| | | Move the HTML 4 translator into a private module.
* Enable Ruff's pylint 'PLC2201' checkAdam Turner2022-12-301-1/+1
| | | | Address all cases where the comparison order check is violated
* Enable Ruff's pylint checksAdam Turner2022-12-292-4/+2
| | | | | Also fix two PLW0602 warnings (``global`` without assignment) and five PLW0120 warnings (else clause on loop without break).
* Enable Ruff's pygrep-hooks checksAdam Turner2022-12-291-1/+1
|