Skip to content

Commit 1de4271

Browse files
Fix for docs not building (#1146)
<!-- Before submitting: - Read CONTRIBUTING.md for workflow - Read AGENTS.md for architecture (especially if AI-generated) Air's design principles: semantic APIs with clear docstrings, concise docs mindful of context window sizes, max readability, less code is better, zero config is ideal. — airwebframework.org --> ## What Pygments 2.20.0 has a breaking change that prevents Air's documentation from building. This PR excludes only that release with `pygments>=2.19.2,!=2.20.0`; the lockfile stays on working version 2.19.2 until a newer fixed release is available. Reference: pygments/pygments#3076 This PR also fixes the misspelled `air.forms` documentation reference and adds an integration test that builds the complete documentation site with MkDocs. ## Reviewer Focus The constraint excludes the known-bad 2.20.0 release while automatically permitting 2.20.1 or later once published, so no follow-up constraint change is required. ## Checklist - [X] Diff contains only changes for this task — no unrelated refactoring or cleanup - [ ] Addresses exactly one issue or feature - [X] New or changed behavior has test coverage - [X] This is the simplest viable approach - [X] AI provenance section removed or accurate
2 parents a6b5822 + 6859a73 commit 1de4271

4 files changed

Lines changed: 33 additions & 6 deletions

File tree

‎docs/api/forms.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Forms
22

3-
::: air.forms
3+
::: air.form

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dependencies = [
8888
"lxml>=6.0.2", # https://pypi.org/project/lxml
8989
"minify-html>=0.18.1", # https://pypi.org/project/minify-html
9090
"nh3>=0.3.2", # https://pypi.org/project/nh3
91-
"pygments>=2.19.2", # https://pypi.org/project/pygments
91+
"pygments>=2.19.2,!=2.20.0", # https://pypi.org/project/pygments
9292
"python-multipart>=0.0.22", # https://pypi.org/project/python-multipart
9393
"rich>=14.3.2", # https://pypi.org/project/rich
9494
"selectolax>=0.4.6", # https://pypi.org/project/selectolax

‎tests/test_docs.py‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""Documentation integration tests."""
2+
3+
from __future__ import annotations
4+
5+
import subprocess
6+
import sys
7+
from pathlib import Path
8+
9+
PROJECT_ROOT = Path(__file__).resolve().parents[1]
10+
11+
12+
def test_documentation_builds(tmp_path: Path) -> None:
13+
subprocess.run(
14+
[
15+
sys.executable,
16+
"-X",
17+
"utf8",
18+
"-m",
19+
"mkdocs",
20+
"build",
21+
"--strict",
22+
"--site-dir",
23+
str(tmp_path),
24+
],
25+
cwd=PROJECT_ROOT,
26+
check=True,
27+
)

‎uv.lock‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)