Commit Graph
104 Commits
Author SHA1 Message Date
Adam Turner 0eae573102 Remove `section_parents` (#13560)
Docutils revision r10129 [1] removes the member from the namespace.

[1]: https://sourceforge.net/p/docutils/code/10129/
2025-05-20 00:05:07 +01:00
Adam Turner 5355a78e79 Fix `test_util` for Docutils 0.22+ (#13548) 2025-05-12 21:44:41 +01:00
Adam Turner 4051354182 Mark tests as expected failures on Docutils 0.22.0rc2 (#13547) 2025-05-12 21:23:22 +01:00
Adam DangoorandAdam Turner 5a73bf6af0 Disallow untyped defs in `tests/test_util/test_util_images.py` (#13543)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-12 17:31:12 +01:00
Adam Dangoor c0c0413493 Remove mypy overrides for `tests.test_util.test_util_matching` (#13449) 2025-03-24 19:28:03 +00:00
Aarni Koskela fc8054cc30 Fall back to 'en' if format_date is called with a falsy value (#13408) 2025-03-20 18:49:07 +00:00
Adam Turner e01e42f5fc Fix `INVALID_BUILTIN_CLASSES` test for Python 3.14.0a6+ 2025-03-19 20:11:35 +00:00
Adam Turner 58e64d4016 Fix `_relative_path()` for unresolved paths 2025-02-21 23:19:10 +00:00
Adam Turner f3e0de1da0 Avoid using attributes of `app` 2025-02-16 04:25:08 +00:00
Adam Turner f1fbbfcbb7 Add annotations to several single-argument ('app') test functions 2025-02-16 01:40:30 +00:00
Adam Turner a980fbcafa Add return annotation to several zero-argument test functions 2025-02-15 23:23:56 +00:00
Adam Turner 139d6b0936 Use full URLs for links to issues and pull requests 2025-02-15 21:47:31 +00:00
Adam Dangoor 3f2b211fb7 Remove mypy overrides for `tests.test_util.test_util_uri` (#13342) 2025-02-15 20:12:46 +00:00
Matthias GeierandAdam Turner 94563a398b Un-deprecate `sphinx.util.import_object` (#13330)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-11 19:07:27 +00:00
Adam Turner baddae6611 Move `test_log_no_ansi_colors` 2025-02-11 01:42:39 +00:00
Adam Turner 22e0f8944b Use pathlib in more places 2025-02-07 13:51:42 +00:00
Adam Turner 34519be296 Ignore test failures from broken Babel 2.17 on Windows (#13290) 2025-02-02 20:01:21 +00:00
Adam Turner 82e9182d43 Initial implementation of an `_Inventory` type (#13275) 2025-01-29 00:46:08 +00:00
Adam Turner 705c1beb16 Convert _INVALID_BUILTIN_CLASSES to use strings instead of runtime objects (#13270)
This is a more flexible approach that does not require importing several modules and types into ``sphinx.util.typing``.
2025-01-27 19:17:00 +00:00
Adam Turner 7406d4222f Move mypy test module exclusions to per-module ignores (#13265) 2025-01-26 19:41:15 +00:00
Adam Turner ca2ab35d94 Add further types to `_INVALID_BUILTIN_CLASSES` (#13263) 2025-01-23 03:53:25 +00:00
Adam Turner 47bff3faea Add new `types types to _INVALID_BUILTIN_CLASSES` (#13262) 2025-01-23 03:35:53 +00:00
Adam Turner ea5fc5957a Add `pathlib types to _INVALID_BUILTIN_CLASSES` (#13261) 2025-01-23 03:26:35 +00:00
Adam Turner e5131ba1bd intersphinx: Create an `_InventoryItem` type (#13248) 2025-01-17 00:41:11 +00:00
Adam Turner a56fdad70b Use `sphinx._cli.util.colour in sphinx.util.console` (#13241) 2025-01-16 16:57:28 +00:00
Adam Turner c4daa95c09 Enable the entire D category in Ruff 2025-01-14 15:55:02 +00:00
Adam Turner c66d3e85d1 Enable 11 more categories in Ruff
* flake8-builtins ('A')
* flake8-blind-except ('BLE')
* flake8-copyright ('CPY')
* eradicate ('ERA')
* flake8-boolean-trap ('FBT')
* flake8-fixme ('FIX')
* flake8-implicit-str-concat ('ISC')
* pep8-naming ('N')
* flake8-use-pathlib ('PTH')
* flake8-self ('SLF')
* tryceratops ('TRY')
2025-01-14 14:43:02 +00:00
Adam Turner cc8161a066 Move `sphinx.util re-exports to module __getattr__` 2025-01-14 01:01:52 +00:00
Bénédikt TranandAdam Turner 2a19d293b6 autodoc: fix detection of class methods implemented by extension modules (#13200)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-12 11:07:30 +00:00
Adam Turner dec45eaf28 Bump Ruff to 0.9.0 2025-01-10 13:50:26 +00:00
Adam Turner df06e6d628 Add `InventoryFile.loads()` (#13215) 2025-01-07 00:40:57 +00:00
Adam Turner d59084a1fa Bump Ruff to 0.8.6 2025-01-06 06:05:55 +00:00
Adam Turner 83bf866059 Avoid attribute indirection with `env` (#13212) 2025-01-05 09:10:55 +00:00
Adam Turner e65bbb96ae Create a new type for the current document's environment state (#13151) 2025-01-04 00:28:03 +00:00
Adam Turner b5f9ac8afc Enable the RUF100 lint in Ruff 2025-01-02 23:49:43 +00:00
Adam Turner 5f6457911d Enable the RUF048 lint in Ruff 2025-01-02 23:49:43 +00:00
Adam Turner 64937535dc Bump Ruff to 0.8.5 2025-01-02 21:11:36 +00:00
Adam Turner d796a8ae21 Enable the RUF029 lint in Ruff 2024-11-30 19:21:35 +00:00
Adam Turner 2f1cd36798 Enable the RUF015 lint in Ruff 2024-11-30 19:19:34 +00:00
Adam Turner 3af48520d2 Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
Dimitri Papadopoulos Orfanos f76ffdf02b Apply flake8-pyi rule PYI018 (#13116) 2024-11-15 00:36:01 +00:00
Dmitry ShachnevandAdam Turner d6da26a7f5 Properly strip time zones which are west of UTC (#13128)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-11-13 21:53:01 +00:00
Adam Turner dedb21e638 Resolve _StrPath warnings in the tests 2024-11-02 21:39:18 +00:00
Adam Turner 71c0fcfbc5 Use pathlib in the tests (#13051) 2024-10-25 22:41:08 +01:00
Adam Turner bf77a4087a Use `_StrPath in sphinx.util.i18n` (#13050) 2024-10-20 22:03:24 +01:00
Adam Turner e58dd58f35 Enable the PLR6201 lint in Ruff 2024-10-19 19:05:43 +01:00
Adam Turner b64e03a5fb Enable the S701 lint in Ruff 2024-10-19 19:05:42 +01:00
Adam Turner c78b4c5404 Enable the PLE0704 lint in Ruff 2024-10-19 01:15:09 +01:00
Adam Turner 423452cdc2 Improve repr for TypeAliasForwardRef 2024-10-17 23:22:24 +01:00
Adam Turner 541bf7bc67 Drop support for Python 3.10 (#13000) 2024-10-17 20:59:41 +01:00