Fix mypy errors
This commit is contained in:
parent
85f1a2875b
commit
1a425a51f4
|
@ -309,7 +309,9 @@ def _prepareconfig(
|
|||
elif isinstance(args, os.PathLike):
|
||||
args = [os.fspath(args)]
|
||||
elif not isinstance(args, list):
|
||||
msg = "`args` parameter expected to be a list of strings, got: {!r} (type: {})"
|
||||
msg = ( # type:ignore[unreachable]
|
||||
"`args` parameter expected to be a list of strings, got: {!r} (type: {})"
|
||||
)
|
||||
raise TypeError(msg.format(args, type(args)))
|
||||
|
||||
config = get_config(args, plugins)
|
||||
|
|
|
@ -397,7 +397,7 @@ if TYPE_CHECKING:
|
|||
from _pytest.scope import _ScopeName
|
||||
|
||||
class _SkipMarkDecorator(MarkDecorator):
|
||||
@overload # type: ignore[override,misc]
|
||||
@overload # type: ignore[override,misc,no-overload-impl]
|
||||
def __call__(self, arg: Markable) -> Markable:
|
||||
...
|
||||
|
||||
|
@ -415,7 +415,7 @@ if TYPE_CHECKING:
|
|||
...
|
||||
|
||||
class _XfailMarkDecorator(MarkDecorator):
|
||||
@overload # type: ignore[override,misc]
|
||||
@overload # type: ignore[override,misc,no-overload-impl]
|
||||
def __call__(self, arg: Markable) -> Markable:
|
||||
...
|
||||
|
||||
|
|
|
@ -1059,7 +1059,7 @@ class TestAssertionRewriteHookDetails:
|
|||
e = OSError()
|
||||
e.errno = 10
|
||||
raise e
|
||||
yield
|
||||
yield # type:ignore[unreachable]
|
||||
|
||||
monkeypatch.setattr(
|
||||
_pytest.assertion.rewrite, "atomic_write", atomic_write_failed
|
||||
|
|
Loading…
Reference in New Issue