Conversation
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
There was a problem hiding this comment.
Pull request overview
Updates the pytest-related pyproject.toml check messages to include examples for pytest 9’s native [tool.pytest] configuration format (in addition to the legacy [tool.pytest.ini_options] format), addressing issue #735.
Changes:
- Expand multiple check docstrings to show both legacy (
[tool.pytest.ini_options]) and pytest 9+ ([tool.pytest]) TOML examples. - Clarify example snippets for common pytest settings (minversion, testpaths, log_level, strict modes, addopts, filterwarnings).
Comments suppressed due to low confidence (1)
src/sp_repo_review/checks/pyproject.py:223
- In this example block the heading uses “# pytest 9”, while other updated examples in this file use “# pytest 9+”. For consistency (and because the format is described as pytest 9+ elsewhere), consider using the same label across all snippets.
# pytest 9
[tool.pytest]
minversion = "9"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # pytest 9+ | ||
| [tool.pytest] | ||
| strict = true | ||
| ``` |
There was a problem hiding this comment.
PR description says the “simplest option” is to always show both legacy and pytest 9+ configuration options. PP305’s message still only shows a [tool.pytest.ini_options] example (no [tool.pytest] / pytest.toml example), so users hitting that check won’t see the new format. Consider updating PP305’s docstring example(s) as well to fully match the PR intent.
Fix #735. Simplest option of just always showing both options. We could make it dynamic, but you'd have to be able to detect which to show, and when to give up and show both. So I think this is fine as users know which one they need.
📚 Documentation preview 📚: https://scientific-python-cookie--748.org.readthedocs.build/