Skip to content

Commit 27ca53b

Browse files
Copilothenryiii
andcommitted
Reorder pattern matching to prioritize build.jobs over build.commands
Co-authored-by: henryiii <4616906+henryiii@users.noreply.github.com>
1 parent 129a10c commit 27ca53b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/sp_repo_review/checks/readthedocs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ def check(readthedocs: dict[str, Any]) -> bool:
9898
match readthedocs:
9999
case {"build": {"tools": {"python": object()}}}:
100100
return True
101-
case {"build": {"commands": object()}}:
102-
return True
103101
case {"build": {"jobs": object()}}:
104102
return True
103+
case {"build": {"commands": object()}}:
104+
return True
105105
case _:
106106
return False
107107

@@ -126,10 +126,10 @@ def check(readthedocs: dict[str, Any]) -> bool:
126126
"""
127127

128128
match readthedocs:
129-
case {"build": {"commands": list()}}:
130-
return True
131129
case {"build": {"jobs": dict()}}:
132130
return True
131+
case {"build": {"commands": list()}}:
132+
return True
133133
case {"sphinx": {"configuration": str()}}:
134134
return True
135135
case {"mkdocs": {"configuration": str()}}:

0 commit comments

Comments
 (0)