From 587371e0538587b9e81e424adc17c2ef9add338f Mon Sep 17 00:00:00 2001 From: Ellis Breen <1263585+griels@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:34:18 +0000 Subject: [PATCH] Fix internal error (#154) As per https://github.com/typeddjango/pytest-mypy-plugins/issues/154 --- pytest_mypy_plugins/item.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_mypy_plugins/item.py b/pytest_mypy_plugins/item.py index 173809e..996c775 100644 --- a/pytest_mypy_plugins/item.py +++ b/pytest_mypy_plugins/item.py @@ -458,7 +458,7 @@ def repr_failure( repr_file_location = ReprFileLocation( path=self.fspath, lineno=self.starting_lineno + excinfo.value.lineno, message="" # type: ignore ) - repr_tb_entry = TraceLastReprEntry( + repr_tb_entry = ReprEntry( exception_repr.reprtraceback.reprentries[-1].lines[1:], None, None, repr_file_location, "short" ) exception_repr.reprtraceback.reprentries = [repr_tb_entry]