Skip to content

Commit 120f130

Browse files
authored
fix: loosen required summary flag (#313)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent aa1cc8d commit 120f130

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sp_repo_review/checks/pyproject.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,16 @@ class PP308(PyProject):
205205
@staticmethod
206206
def check(pyproject: dict[str, Any]) -> bool:
207207
"""
208-
`-ra` should be in `addopts = [...]` (print summary of all fails/errors).
208+
An explicit summary flag like `-ra` should be in `addopts = [...]`
209+
(print summary of all fails/errors).
209210
210211
```toml
211212
[tool.pytest.ini_options]
212213
addops = ["-ra", "--strict-config", "--strict-markers"]
213214
```
214215
"""
215216
options = pyproject["tool"]["pytest"]["ini_options"]
216-
return "-ra" in options.get("addopts", [])
217+
return any(opt.startswith("-r") for opt in options.get("addopts", []))
217218

218219

219220
class PP309(PyProject):

0 commit comments

Comments
 (0)