Commit Graph

88 Commits

Author SHA1 Message Date
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 Tran
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 Shachnev
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
Adam Turner
71598455a2 Add `sphinx.util._lines` 2024-10-05 16:54:31 +01:00
Adam Turner
40f8693661 Add `sphinx.util._uri` 2024-10-05 16:47:26 +01:00
danieleades
7546545876 Further improve typing in tests/ (#12816)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-03 20:17:40 +01:00
Adam Dangoor
7487e764cb Resolve a few mypy issues in tests (#12912)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-25 08:57:11 +01:00
Adam Turner
45b7ebdc17 Allow using GMT in the HTML last updated format (#12907) 2024-09-22 07:55:09 +01:00
Adam Dangoor
15aadd6e1a Change the language type given to CatalogRepository in tests (#12853) 2024-09-02 14:41:34 +01:00
Adam Dangoor
6a07bfcb78 Remove unused `app fixture passed to test_util_rst` tests (#12840) 2024-08-31 08:12:16 +01:00
Adam Turner
fadb6b10cb Stop exiting early with `--fail-on-warnings; add --exception-on-warning` (#12743)
Co-authored-by: Jeremy Maitin-Shepard <jbms@google.com>
2024-08-13 17:12:42 +01:00
Adam Turner
0b17bb1029 Always define the builder and `testroot when using the app` fixtureture (#12775) 2024-08-12 22:34:03 +01:00
Adam Turner
d39ba32604 Add `sphinx.util._importer` (#12762) 2024-08-11 17:24:26 +01:00
Adam Turner
ed7a980b34 Fix test formatting 2024-08-11 16:58:19 +01:00
James Addison
999baca135 Mention dynamically-evaluated templates whilst copying static files (#12726) 2024-08-11 16:37:41 +01:00
Adam Turner
d03156e078 Format `tests/` (#12760) 2024-08-11 14:58:56 +01:00
Adam Turner
18fbced7e0 Reduce the formatter's target line length to 88 (#12757) 2024-08-11 00:19:50 +01:00
Adam Turner
1c682bc3ba Remove `_typing_internal_name` (#12664) 2024-07-23 16:10:10 +01:00
Adam Turner
1f2891530d Use `app.status and app.warning` in tests (#12663) 2024-07-23 15:35:55 +01:00