File tree 4 files changed +5
-4
lines changed
4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 26
26
- id : mypy
27
27
files : ^(src/|testing/|scripts/)
28
28
args : []
29
+ language_version : " 3.8"
29
30
additional_dependencies :
30
31
- iniconfig>=1.1.0
31
32
- attrs>=19.2.0
Original file line number Diff line number Diff line change 49
49
50
50
51
51
if TYPE_CHECKING :
52
- from typing import Self
52
+ from typing_extensions import Self
53
53
54
54
from _pytest .fixtures import FixtureManager
55
55
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ def pytest_runtest_call(item: Item) -> None:
167
167
del sys .last_value
168
168
del sys .last_traceback
169
169
if sys .version_info >= (3 , 12 , 0 ):
170
- del sys .last_exc
170
+ del sys .last_exc # type:ignore[attr-defined]
171
171
except AttributeError :
172
172
pass
173
173
try :
@@ -177,7 +177,7 @@ def pytest_runtest_call(item: Item) -> None:
177
177
sys .last_type = type (e )
178
178
sys .last_value = e
179
179
if sys .version_info >= (3 , 12 , 0 ):
180
- sys .last_exc = e
180
+ sys .last_exc = e # type:ignore[attr-defined]
181
181
assert e .__traceback__ is not None
182
182
# Skip *this* frame
183
183
sys .last_traceback = e .__traceback__ .tb_next
Original file line number Diff line number Diff line change @@ -1030,7 +1030,7 @@ def runtest(self):
1030
1030
assert sys .last_type is IndexError
1031
1031
assert isinstance (sys .last_value , IndexError )
1032
1032
if sys .version_info >= (3 , 12 , 0 ):
1033
- assert isinstance (sys .last_exc , IndexError )
1033
+ assert isinstance (sys .last_exc , IndexError ) # type:ignore[attr-defined]
1034
1034
1035
1035
assert sys .last_value .args [0 ] == "TEST"
1036
1036
assert sys .last_traceback
You can’t perform that action at this time.
0 commit comments