From 7161970648c75444a5d43e21cc8c072a66bc73f9 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 17 Jun 2026 17:09:55 -0400 Subject: [PATCH] refactor: remove unused PYTEST_VERSION and packaging import `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 --- pytest_github_actions_annotate_failures/plugin.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pytest_github_actions_annotate_failures/plugin.py b/pytest_github_actions_annotate_failures/plugin.py index 130c85b..8386fa5 100644 --- a/pytest_github_actions_annotate_failures/plugin.py +++ b/pytest_github_actions_annotate_failures/plugin.py @@ -6,7 +6,6 @@ import pytest from _pytest._code.code import ExceptionRepr, ReprEntry -from packaging import version if TYPE_CHECKING: from warnings import WarningMessage @@ -23,9 +22,6 @@ # https://github.com/pytest-dev/pytest/blob/master/src/_pytest/terminal.py -PYTEST_VERSION = version.parse(pytest.__version__) - - class _AnnotateErrors: @pytest.hookimpl(tryfirst=True) def pytest_runtest_logreport(self, report: TestReport):