Skip to content

Commit 8f5533c

Browse files
authored
fix: build commands is a valid alternative to build tools python (#608)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 6afcdcd commit 8f5533c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/sp_repo_review/checks/readthedocs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def check(readthedocs: dict[str, Any]) -> bool:
9696
match readthedocs:
9797
case {"build": {"tools": {"python": object()}}}:
9898
return True
99+
case {"build": {"commands": object()}}:
100+
return True
99101
case _:
100102
return False
101103

tests/test_readthedocs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ def test_rtd103_true() -> None:
5252
assert compute_check("RTD103", readthedocs=readthedocs).result
5353

5454

55+
def test_rtd103_commands() -> None:
56+
readthedocs = yaml.safe_load("""
57+
build:
58+
commands:
59+
- one
60+
""")
61+
assert compute_check("RTD103", readthedocs=readthedocs).result
62+
63+
5564
def test_rtd103_false() -> None:
5665
readthedocs = yaml.safe_load("""
5766
build:

0 commit comments

Comments
 (0)