Skip to content

fix: show pytest 9 examples too#748

Merged
henryiii merged 3 commits intomainfrom
henryiii/fix/showpytest9
Mar 2, 2026
Merged

fix: show pytest 9 examples too#748
henryiii merged 3 commits intomainfrom
henryiii/fix/showpytest9

Conversation

@henryiii
Copy link
Collaborator

@henryiii henryiii commented Mar 2, 2026

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/

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +328 to 332

# pytest 9+
[tool.pytest]
strict = true
```
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@henryiii henryiii merged commit 78f73a1 into main Mar 2, 2026
20 checks passed
@henryiii henryiii deleted the henryiii/fix/showpytest9 branch March 2, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for [tool.pytest] TOML block added in pytest 9

2 participants