refactor: remove unused PYTEST_VERSION and packaging import#141
Merged
Conversation
`PYTEST_VERSION` was computed but never referenced in the plugin; pytest version differences are handled by duck-typing on `report.longrepr` instead. Removing it also drops the runtime import of `packaging`, which is not a declared dependency (it was only available transitively via pytest). Assisted-by: ClaudeCode:claude-opus-4.8
cdea5e2 to
7161970
Compare
edgarrmondragon
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did a quick scan of the repo, this came up.
🤖 AI text below 🤖
PYTEST_VERSIONwas computed inplugin.pybut never referenced. The plugin handles pytest 7/8/9 differences by duck-typing onreport.longreprrather than branching on a version check, so the constant was dead code.Removing it also drops the runtime
from packaging import versionimport.packagingis not a declared dependency of this package — it was only available transitively via pytest — so the plugin no longer relies on an undeclared import. (plugin_test.pykeeps its ownPYTEST_VERSION, which is used to skip the subtests test on pytest < 9.)Test suite passes unchanged.