From 96d5debfd1ae4797db57856892b9fdb709db6fb7 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 2 Mar 2026 11:18:03 -0500 Subject: [PATCH 1/3] fix: show pytest 9 examples too Signed-off-by: Henry Schreiner --- src/sp_repo_review/checks/pyproject.py | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/sp_repo_review/checks/pyproject.py b/src/sp_repo_review/checks/pyproject.py index 595a7e42..9015a15c 100644 --- a/src/sp_repo_review/checks/pyproject.py +++ b/src/sp_repo_review/checks/pyproject.py @@ -214,7 +214,12 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: support native configuration and toml config files). ```toml + # Old pytest [tool.pytest.ini_options] + minversion = "6" + + # pytest 9 + [tool.pytest] minversion = "9" ``` """ @@ -238,8 +243,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: The `testpaths` setting should be set to a reasonable default. ```toml + # Old pytest [tool.pytest.ini_options] testpaths = ["tests"] + + # pytest 9+ + [tool.pytest] + testpaths = ["tests"] ``` """ _, options = pytest @@ -259,8 +269,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: failures. ```toml + # Old pytest [tool.pytest.ini_options] log_level = "INFO" + + # pytest 9+ + [tool.pytest] + log_level = "INFO" ``` """ _, options = pytest @@ -307,8 +322,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: config setting is misspelled. ```toml + # Old pytest [tool.pytest.ini_options] addopts = ["-ra", "--strict-config", "--strict-markers"] + + # pytest 9+ + [tool.pytest] + strict = true ``` """ _, options = pytest @@ -333,8 +353,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: be specified in config, avoiding misspellings. ```toml + # Old pytest [tool.pytest.ini_options] addopts = ["-ra", "--strict-config", "--strict-markers"] + + # pytest 9+ + [tool.pytest] + strict = true ``` """ _, options = pytest @@ -358,8 +383,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: (print summary of all fails/errors). ```toml + # Old pytest [tool.pytest.ini_options] addopts = ["-ra", "--strict-config", "--strict-markers"] + + # pytest 9+ + [tool.pytest] + addopts = ["-ra"] ``` """ loc, options = pytest @@ -382,8 +412,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: will hide important warnings otherwise, like deprecations. ```toml + # Old pytest [tool.pytest.ini_options] filterwarnings = ["error"] + + # pytest 9+ + [tool.pytest] + filterwarnings = ["error"] ``` """ _, options = pytest From 6c039c12c96b5b44b2245ce38fff059de4fd37fa Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 2 Mar 2026 11:37:20 -0500 Subject: [PATCH 2/3] Add pytest 9 example to PP305 too --- src/sp_repo_review/checks/pyproject.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sp_repo_review/checks/pyproject.py b/src/sp_repo_review/checks/pyproject.py index 9015a15c..ba56b3e0 100644 --- a/src/sp_repo_review/checks/pyproject.py +++ b/src/sp_repo_review/checks/pyproject.py @@ -298,6 +298,9 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: ```toml [tool.pytest.ini_options] xfail_strict = true + + [tool.pytest] + strict = true ``` """ _, options = pytest From f511992b21edd7eb7b13391d82cc61520745e3be Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:40:14 +0000 Subject: [PATCH 3/3] style: pre-commit fixes --- src/sp_repo_review/checks/pyproject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sp_repo_review/checks/pyproject.py b/src/sp_repo_review/checks/pyproject.py index ba56b3e0..e1df7231 100644 --- a/src/sp_repo_review/checks/pyproject.py +++ b/src/sp_repo_review/checks/pyproject.py @@ -300,7 +300,7 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: xfail_strict = true [tool.pytest] - strict = true + strict = true ``` """ _, options = pytest