Skip to content

Commit 7161970

Browse files
committed
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
1 parent 174c3f8 commit 7161970

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

  • pytest_github_actions_annotate_failures

pytest_github_actions_annotate_failures/plugin.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import pytest
88
from _pytest._code.code import ExceptionRepr, ReprEntry
9-
from packaging import version
109

1110
if TYPE_CHECKING:
1211
from warnings import WarningMessage
@@ -23,9 +22,6 @@
2322
# https://github.com/pytest-dev/pytest/blob/master/src/_pytest/terminal.py
2423

2524

26-
PYTEST_VERSION = version.parse(pytest.__version__)
27-
28-
2925
class _AnnotateErrors:
3026
@pytest.hookimpl(tryfirst=True)
3127
def pytest_runtest_logreport(self, report: TestReport):

0 commit comments

Comments
 (0)