pyproject-api 1.12.5__tar.gz → 1.12.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. pyproject_api-1.12.6/.github/workflows/actions.lock +51 -0
  2. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/workflows/check.yaml +3 -3
  3. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/workflows/codeql.yaml +1 -1
  4. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/workflows/news.yaml +4 -4
  5. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/workflows/prepare-release.yaml +1 -1
  6. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/workflows/release.yaml +5 -5
  7. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/workflows/scorecard.yaml +1 -1
  8. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/workflows/upgrade-release-tools.yaml +1 -3
  9. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.pre-commit-config.yaml +28 -5
  10. pyproject_api-1.12.6/.python-sbom-revision +1 -0
  11. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/PKG-INFO +1 -1
  12. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/docs/api.rst +3 -1
  13. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/docs/changelog.rst +25 -0
  14. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/docs/conf.py +26 -21
  15. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/pylock.toml +510 -397
  16. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/pyproject.toml +17 -5
  17. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/__init__.py +2 -4
  18. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/__main__.py +13 -14
  19. pyproject_api-1.12.6/src/pyproject_api/_backend.py +164 -0
  20. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/_frontend.py +293 -224
  21. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/_version.py +2 -2
  22. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/_via_fresh_subprocess.py +41 -31
  23. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/tests/demo_pkg_inline/build.py +63 -66
  24. {pyproject_api-1.12.5/tests → pyproject_api-1.12.6/tests/pyproject_api}/test_backend.py +60 -60
  25. {pyproject_api-1.12.5/tests → pyproject_api-1.12.6/tests/pyproject_api}/test_util.py +5 -7
  26. pyproject_api-1.12.6/tests/pyproject_api/test_via_fresh_subprocess.py +86 -0
  27. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/tests/test_frontend.py +137 -110
  28. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/tests/test_frontend_setuptools.py +19 -21
  29. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/tests/test_main.py +22 -60
  30. pyproject_api-1.12.6/tests/test_version.py +8 -0
  31. pyproject_api-1.12.5/src/pyproject_api/_backend.py +0 -155
  32. pyproject_api-1.12.5/tests/test_version.py +0 -7
  33. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/FUNDING.yaml +0 -0
  34. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/SECURITY.md +0 -0
  35. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/THREAT_MODEL.md +0 -0
  36. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/dependabot.yaml +0 -0
  37. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.github/release.yaml +0 -0
  38. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.gitignore +0 -0
  39. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/.readthedocs.yml +0 -0
  40. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/CODE_OF_CONDUCT.md +0 -0
  41. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/CONTRIBUTING.md +0 -0
  42. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/LICENSE +0 -0
  43. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/README.md +0 -0
  44. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/docs/changelog.d/.gitkeep +0 -0
  45. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/docs/changelog.d/template.jinja2 +0 -0
  46. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/docs/contributing.rst +0 -0
  47. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/docs/index.rst +0 -0
  48. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/_backend.pyi +0 -0
  49. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/_util.py +0 -0
  50. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/src/pyproject_api/py.typed +0 -0
  51. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/tests/_build_sdist.py +0 -0
  52. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/tests/demo_pkg_inline/pyproject.toml +0 -0
  53. {pyproject_api-1.12.5 → pyproject_api-1.12.6}/tox.toml +0 -0
@@ -0,0 +1,51 @@
1
+ # This file is machine-generated by `gh actions-lock`.
2
+ # Do not edit by hand; run `gh actions-lock` to update.
3
+ # Docs: https://gh.io/actions-lockfile
4
+ version: 'v0.0.3'
5
+ workflows:
6
+ '.github/workflows/check.yaml':
7
+ - 'tox-dev/github-workflows@6.8.4'
8
+ '.github/workflows/codeql.yaml': []
9
+ '.github/workflows/news.yaml':
10
+ - 'actions/checkout@v7.0.1'
11
+ - 'astral-sh/setup-uv@v10.3.3'
12
+ - 'tox-dev/github-workflows@6.8.4'
13
+ '.github/workflows/prepare-release.yaml': []
14
+ '.github/workflows/release.yaml':
15
+ - 'actions/download-artifact@v8.0.2'
16
+ - 'pypa/gh-action-pypi-publish@v1.14.3'
17
+ '.github/workflows/scorecard.yaml': []
18
+ '.github/workflows/upgrade-release-tools.yaml': []
19
+ dependencies:
20
+ 'actions/checkout@v7.0.1':
21
+ ref: 'v7.0.1'
22
+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
23
+ owner_id: 44036562
24
+ repo_id: 197814629
25
+ 'actions/download-artifact@v8.0.2':
26
+ ref: 'v8.0.2'
27
+ commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
28
+ owner_id: 44036562
29
+ repo_id: 192626254
30
+ 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405':
31
+ ref: 'v6.2.0'
32
+ commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405'
33
+ owner_id: 44036562
34
+ repo_id: 192625525
35
+ 'astral-sh/setup-uv@v10.3.3':
36
+ ref: 'v10.3.3'
37
+ commit: 'sha1-68559e99cc807c1eb7e9238fd43a15bba460eec2'
38
+ owner_id: 115962839
39
+ repo_id: 846733598
40
+ 'pypa/gh-action-pypi-publish@v1.14.3':
41
+ ref: 'v1.14.3'
42
+ commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086'
43
+ owner_id: 647025
44
+ repo_id: 178055147
45
+ uses:
46
+ - 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405'
47
+ 'tox-dev/github-workflows@6.8.4':
48
+ ref: '6.8.4'
49
+ commit: 'sha1-9334311ad92f91f7f5c937b3ab218da4d317116e'
50
+ owner_id: 20345659
51
+ repo_id: 1426182029
@@ -16,7 +16,7 @@ permissions:
16
16
  jobs:
17
17
  test:
18
18
  name: 🧪 Test
19
- uses: tox-dev/github-workflows/.github/workflows/check.yaml@13381289334b15375958be7f7438f3c3d860e575 # 6.5.5
19
+ uses: tox-dev/github-workflows/.github/workflows/check.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
20
20
  permissions:
21
21
  contents: read
22
22
  with:
@@ -52,7 +52,7 @@ jobs:
52
52
  dry-run: true
53
53
  hooks:
54
54
  name: 🧹 Hooks under the cooldown
55
- uses: tox-dev/github-workflows/.github/workflows/cooled-hooks.yaml@0c4cffd63033d38196319524d101caae1eef925b # 6.7.2
55
+ uses: tox-dev/github-workflows/.github/workflows/cooled-hooks.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
56
56
  permissions:
57
57
  contents: read
58
58
  gate:
@@ -62,6 +62,6 @@ jobs:
62
62
  runs-on: ubuntu-26.04
63
63
  steps:
64
64
  - name: 🚦 Require all needed jobs to pass
65
- uses: tox-dev/github-workflows/required-checks@13381289334b15375958be7f7438f3c3d860e575 # 6.5.5
65
+ uses: tox-dev/github-workflows/required-checks@6.8.4
66
66
  with:
67
67
  needs: ${{ toJSON(needs) }}
@@ -13,7 +13,7 @@ permissions: {}
13
13
  jobs:
14
14
  analyze:
15
15
  name: 🛡️ Analyze
16
- uses: tox-dev/github-workflows/.github/workflows/codeql.yaml@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
16
+ uses: tox-dev/github-workflows/.github/workflows/codeql.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
17
17
  permissions:
18
18
  contents: read
19
19
  security-events: write
@@ -11,20 +11,20 @@ jobs:
11
11
  runs-on: ubuntu-26.04
12
12
  steps:
13
13
  - name: 📥 Check out code
14
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
14
+ uses: actions/checkout@v7.0.1
15
15
  with:
16
16
  fetch-depth: 0
17
17
  persist-credentials: false
18
18
  - name: 🐍 Install uv
19
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
19
+ uses: astral-sh/setup-uv@v10.3.3
20
20
  with:
21
21
  version: latest-known
22
22
  python-version: "3.15"
23
23
  enable-cache: false
24
24
  - name: 📦 Install locked release tools
25
- uses: tox-dev/github-workflows/install-locked-tools@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
25
+ uses: tox-dev/github-workflows/install-locked-tools@6.8.4
26
26
  with:
27
27
  groups: release-news
28
28
  venv: ${{ runner.temp }}/release-tools
29
29
  - name: 🔍 Validate news fragments
30
- uses: tox-dev/github-workflows/validate-news@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
30
+ uses: tox-dev/github-workflows/validate-news@6.8.4
@@ -22,7 +22,7 @@ permissions: {}
22
22
  jobs:
23
23
  prepare:
24
24
  name: 🏷️ Prepare Towncrier release
25
- uses: tox-dev/github-workflows/.github/workflows/prepare-towncrier-release.yaml@0c4cffd63033d38196319524d101caae1eef925b # 6.7.2
25
+ uses: tox-dev/github-workflows/.github/workflows/prepare-towncrier-release.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
26
26
  permissions:
27
27
  contents: read
28
28
  pull-requests: read
@@ -10,12 +10,12 @@ concurrency:
10
10
  jobs:
11
11
  build:
12
12
  name: 🏗️ Build
13
- uses: tox-dev/github-workflows/.github/workflows/validate-python-release.yaml@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
13
+ uses: tox-dev/github-workflows/.github/workflows/validate-python-release.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
14
14
  permissions:
15
15
  contents: read
16
16
  github-notes:
17
17
  name: 📝 Render GitHub Release notes
18
- uses: tox-dev/github-workflows/.github/workflows/release-notes.yaml@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
18
+ uses: tox-dev/github-workflows/.github/workflows/release-notes.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
19
19
  permissions:
20
20
  contents: read
21
21
  with:
@@ -33,19 +33,19 @@ jobs:
33
33
  id-token: write
34
34
  steps:
35
35
  - name: 📩 Download distributions
36
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
36
+ uses: actions/download-artifact@v8.0.2
37
37
  with:
38
38
  artifact-ids: ${{ needs.build.outputs.distributions-artifact-id }}
39
39
  path: dist/
40
40
  - name: 🚀 Publish to PyPI
41
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
41
+ uses: pypa/gh-action-pypi-publish@v1.14.3
42
42
  with:
43
43
  packages-dir: dist
44
44
  attestations: true
45
45
  github-release:
46
46
  name: 🚀 Publish GitHub Release
47
47
  needs: [build, release, github-notes]
48
- uses: tox-dev/github-workflows/.github/workflows/github-release.yaml@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
48
+ uses: tox-dev/github-workflows/.github/workflows/github-release.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
49
49
  permissions:
50
50
  contents: write
51
51
  with:
@@ -23,4 +23,4 @@ jobs:
23
23
  pull-requests: read # read reviews for the Code-Review check
24
24
  security-events: write # upload the SARIF results to code scanning
25
25
  statuses: read # read commit statuses for the CI-Tests check
26
- uses: tox-dev/github-workflows/.github/workflows/scorecard.yaml@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
26
+ uses: tox-dev/github-workflows/.github/workflows/scorecard.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
@@ -10,14 +10,12 @@ concurrency:
10
10
  jobs:
11
11
  upgrade:
12
12
  name: 🔀 Upgrade release tools
13
- uses: tox-dev/github-workflows/.github/workflows/upgrade-release-tools.yaml@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0
13
+ uses: tox-dev/github-workflows/.github/workflows/upgrade-release-tools.yaml@9334311ad92f91f7f5c937b3ab218da4d317116e # 6.8.4
14
14
  permissions:
15
15
  contents: read
16
16
  secrets:
17
17
  RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
18
18
  with:
19
- commit-message: "build(deps): refresh release lock"
20
- pull-request-title: "build(deps): refresh release tool lock"
21
19
  pull-request-body: |-
22
20
  Relock `pylock.toml` with the latest release tools.
23
21
  The lock records the exact versions used during release preparation and GitHub note rendering.
@@ -1,3 +1,5 @@
1
+ # prek runs lower priorities first and equal ones concurrently, so hooks sharing a priority never write the same
2
+ # file; pre-commit ignores the key and runs hooks in file order.
1
3
  ci:
2
4
  autoupdate_schedule: quarterly
3
5
  default_language_version:
@@ -7,38 +9,56 @@ repos:
7
9
  rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
8
10
  hooks:
9
11
  - id: end-of-file-fixer
12
+ priority: 1
10
13
  - id: trailing-whitespace
14
+ priority: 2
11
15
  - repo: https://github.com/python-jsonschema/check-jsonschema
12
16
  rev: a76b92851fc9eede9f9bc4073eb55202f34eb0df # frozen: 0.39.0
13
17
  hooks:
14
18
  - id: check-github-workflows
19
+ priority: 8
15
20
  args: ["--verbose"]
16
21
  - repo: https://github.com/google/yamlfmt
17
22
  rev: 21ca5323a9c87ee37a434e0ca908efc0a89daa07 # frozen: v0.21.0
18
23
  hooks:
19
24
  - id: yamlfmt
25
+ priority: 3
20
26
  - repo: https://github.com/codespell-project/codespell
21
27
  rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
22
28
  hooks:
23
29
  - id: codespell
30
+ priority: 8
24
31
  - repo: https://github.com/tox-dev/tox-toml-fmt
25
- rev: "5125f601c3e134347288c3d42f3b34298b7cf1be" # frozen: v1.11.1
32
+ rev: "522f1a9f55dca6596a20adaae2f1f08e61c0f0a4" # frozen: v1.11.3
26
33
  hooks:
27
34
  - id: tox-toml-fmt
35
+ priority: 3
28
36
  - repo: https://github.com/tox-dev/pyproject-fmt
29
- rev: "50e0f3aee9dc5747a5f173f79a7417403c18dda6" # frozen: v2.30.3
37
+ rev: "3c6e76e10abcae02303212289efed3413350769c" # frozen: v2.30.6
30
38
  hooks:
31
39
  - id: pyproject-fmt
40
+ priority: 3
32
41
  - repo: https://github.com/astral-sh/ruff-pre-commit
33
- rev: "25bcf95026b96e2dd3c0aec3090c3d6ef6ca2e6c" # frozen: v0.17.3
42
+ rev: "c0f278f1254ccc8fb09676bcdb8d847e7db493e5" # frozen: v0.17.4
34
43
  hooks:
35
- - id: ruff-format
36
44
  - id: ruff
45
+ priority: 5
37
46
  args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
47
+ - repo: https://github.com/gaborbernat/simplint-pre-commit
48
+ rev: "a12d8eaac290be24041a3e2778c636c56453722e" # frozen: v0.12.2
49
+ hooks:
50
+ - id: simplint
51
+ priority: 6
52
+ - repo: https://github.com/astral-sh/ruff-pre-commit
53
+ rev: "c0f278f1254ccc8fb09676bcdb8d847e7db493e5" # frozen: v0.17.4
54
+ hooks:
55
+ - id: ruff-format
56
+ priority: 7
38
57
  - repo: https://github.com/LilSpazJoekp/docstrfmt
39
58
  rev: c1813841673cdcd6cf602dde1edb78a5d5e45235 # frozen: v2.2.1
40
59
  hooks:
41
60
  - id: docstrfmt
61
+ priority: 3
42
62
  files: |
43
63
  (?x)
44
64
  ^docs/changelog[.]rst$ # Only the generated release history.
@@ -46,10 +66,13 @@ repos:
46
66
  additional_dependencies:
47
67
  - "sphinx==9.2.0"
48
68
  - repo: https://github.com/zizmorcore/zizmor-pre-commit
49
- rev: c92afdf2c6ca336aaa8f39e2bd8d48f62dbd8e1f # frozen: v1.31.1
69
+ rev: 06a39750ec31860bb44f2acf67182c40016cd1e7 # frozen: v1.32.0
50
70
  hooks:
51
71
  - id: zizmor
72
+ priority: 8
52
73
  - repo: meta
53
74
  hooks:
54
75
  - id: check-hooks-apply
76
+ priority: 8
55
77
  - id: check-useless-excludes
78
+ priority: 8
@@ -0,0 +1 @@
1
+ node: dd41ba7c7123d27026fe31daba9e575fd9f72edf
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pyproject-api
3
- Version: 1.12.5
3
+ Version: 1.12.6
4
4
  Import-Name: pyproject_api
5
5
  Summary: API to interact with the python pyproject.toml based projects
6
6
  Project-URL: Changelog, https://github.com/tox-dev/pyproject-api/blob/main/docs/changelog.rst
@@ -4,7 +4,9 @@ API
4
4
 
5
5
  .. currentmodule:: pyproject_api
6
6
 
7
- .. autodata:: __version__
7
+ .. data:: __version__
8
+
9
+ The semantic version of the project.
8
10
 
9
11
  Frontend
10
12
  --------
@@ -5,6 +5,31 @@ Release History
5
5
 
6
6
  .. towncrier release notes start
7
7
 
8
+ .. _release-1-12-6:
9
+
10
+ v1.12.6 (2026-11-18)
11
+ --------------------
12
+
13
+ .. _release-1-12-6-fixed:
14
+
15
+ Fixed
16
+ ^^^^^
17
+
18
+ - Keep the caller's ``PYTHONPATH`` importable when ``SubprocessFrontend`` starts a backend that sets
19
+ ``build-system.backend-path``; the in-tree paths now come first instead of replacing it (:pr:`375`) by
20
+ :user:`HarshJamgaonkar05`.
21
+ - Restore plain tuple results and public annotations for frontend creation and built metadata (:pr:`365`) by
22
+ :user:`gaborbernat`.
23
+
24
+ .. _release-1-12-6-packaging:
25
+
26
+ Packaging
27
+ ^^^^^^^^^
28
+
29
+ - Every wheel now carries a `PEP 770 <https://peps.python.org/pep-0770/>`_ CycloneDX SBOM in its ``.dist-info/sboms``
30
+ directory, written at build time by `python-sbom <https://github.com/tox-dev/python-sbom>`_ (:pr:`362`) by
31
+ :user:`gaborbernat`.
32
+
8
33
  .. _release-1-12-5:
9
34
 
10
35
  v1.12.5 (2026-11-07)
@@ -1,9 +1,9 @@
1
- # ruff:ignore[undocumented-public-module]
1
+ # ruff:ignore[undocumented-public-module] # Sphinx executes this file as configuration, nothing imports it
2
2
  from __future__ import annotations
3
3
 
4
4
  import os
5
5
  from pathlib import Path
6
- from typing import TYPE_CHECKING
6
+ from typing import TYPE_CHECKING, Final
7
7
 
8
8
  from sphinx.domains.python import PythonDomain
9
9
 
@@ -16,11 +16,11 @@ if TYPE_CHECKING:
16
16
  from sphinx.builders import Builder
17
17
  from sphinx.environment import BuildEnvironment
18
18
  project = name = "pyproject_api"
19
- company = "tox-dev"
20
- project_copyright = f"{company}"
19
+ company: Final[str] = "tox-dev"
20
+ project_copyright: Final[str] = f"{company}"
21
21
  version, release = __version__, __version__.split("+")[0]
22
22
 
23
- extensions = [
23
+ extensions: Final[list[str]] = [
24
24
  "sphinx_llm.txt",
25
25
  "sphinx.ext.autosectionlabel",
26
26
  "sphinx.ext.extlinks",
@@ -31,43 +31,48 @@ extensions = [
31
31
  "sphinxcontrib.towncrier.ext",
32
32
  ]
33
33
  master_doc, source_suffix = "index", ".rst"
34
- exclude_patterns = ["changelog.d/*"]
35
- autosectionlabel_maxdepth = 2
36
- towncrier_draft_autoversion_mode = "draft"
37
- towncrier_draft_include_empty = True
38
- towncrier_draft_working_directory = Path(__file__).parent.parent
34
+ exclude_patterns: Final[list[str]] = ["changelog.d/*"]
35
+ autosectionlabel_maxdepth: Final[int] = 2
36
+ towncrier_draft_autoversion_mode: Final[str] = "draft"
37
+ towncrier_draft_include_empty: Final[bool] = True
38
+ towncrier_draft_working_directory: Final[Path] = Path(__file__).parent.parent
39
39
 
40
- html_theme = "furo"
40
+ html_theme: Final[str] = "furo"
41
41
  html_title, html_last_updated_fmt = "pyproject-api docs", "%Y-%m-%dT%H:%M:%S"
42
42
  pygments_style, pygments_dark_style = "sphinx", "monokai"
43
43
 
44
44
  autoclass_content, autodoc_typehints = "both", "none"
45
- autodoc_default_options = {"members": True, "member-order": "bysource", "undoc-members": True, "show-inheritance": True}
46
- inheritance_alias = {}
45
+ autodoc_default_options: Final[dict[str, bool | str]] = {
46
+ "members": True,
47
+ "member-order": "bysource",
48
+ "undoc-members": True,
49
+ "show-inheritance": True,
50
+ }
51
+ inheritance_alias: Final[dict[str, str]] = {}
47
52
 
48
- extlinks = {
53
+ extlinks: Final[dict[str, tuple[str, str]]] = {
49
54
  "issue": ("https://github.com/tox-dev/pyproject-api/issues/%s", "#%s"),
50
55
  "pull": ("https://github.com/tox-dev/pyproject-api/pull/%s", "PR #%s"),
51
56
  "pr": ("https://github.com/tox-dev/pyproject-api/pull/%s", "PR #%s"),
52
57
  "user": ("https://github.com/%s", "@%s"),
53
58
  }
54
- intersphinx_mapping = {
59
+ intersphinx_mapping: Final[dict[str, tuple[str, None]]] = {
55
60
  "python": ("https://docs.python.org/3", None),
56
61
  "packaging": ("https://packaging.pypa.io/en/latest", None),
57
62
  }
58
63
 
59
- nitpicky = True
60
- nitpick_ignore = []
64
+ nitpicky: Final[bool] = True
65
+ nitpick_ignore: Final[list[tuple[str, str]]] = []
61
66
 
62
67
 
63
- def setup(app: Sphinx) -> None: # ruff:ignore[undocumented-public-function]
68
+ def setup(app: Sphinx) -> None:
64
69
  class PatchedPythonDomain(PythonDomain):
65
- def resolve_xref( # ruff:ignore[too-many-arguments, too-many-positional-arguments]
70
+ def resolve_xref( # ruff:ignore[too-many-arguments, too-many-positional-arguments] # the signature is Sphinx's resolve_xref override
66
71
  self,
67
72
  env: BuildEnvironment,
68
73
  fromdocname: str,
69
74
  builder: Builder,
70
- type: str, # ruff:ignore[builtin-argument-shadowing]
75
+ type: str, # ruff:ignore[builtin-argument-shadowing] # the name is fixed by Sphinx's resolve_xref signature
71
76
  target: str,
72
77
  node: pending_xref,
73
78
  contnode: Element,
@@ -83,4 +88,4 @@ def setup(app: Sphinx) -> None: # ruff:ignore[undocumented-public-function]
83
88
  app.add_domain(PatchedPythonDomain, override=True)
84
89
 
85
90
 
86
- markdown_http_base = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
91
+ markdown_http_base: Final[str] = os.environ.get("READTHEDOCS_CANONICAL_URL", "")