Skip to content

Commit 575bbff

Browse files
committed
refactor: fix some unused ignores for mypy
1 parent 6921c9a commit 575bbff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from hashlib import sha512
1414
from io import StringIO
1515
from pathlib import Path
16+
from typing import Type, cast
1617

1718
import pytest
1819
from _pytest._code.code import ExceptionInfo, TerminalRepr
@@ -274,7 +275,7 @@ def pytest_runtest_makereport(item, call):
274275
if not isinstance(excinfo, ExceptionInfo):
275276
_outcome = "failed"
276277
longrepr = excinfo
277-
elif excinfo.errisinstance(skip.Exception): # type: ignore
278+
elif excinfo.errisinstance(cast(Type[Exception], skip.Exception)):
278279
_outcome = "skipped"
279280
r = excinfo._getreprcrash()
280281
longrepr = (str(r.path), r.lineno, r.message) if r is not None else excinfo

0 commit comments

Comments
 (0)