diff options
author | Ran Benita <ran@unusedvar.com> | 2020-06-07 13:05:32 +0300 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-06-12 17:34:31 +0300 |
commit | 7081ed19b892a799e1dea99a7922cab79fefc1df (patch) | |
tree | c2e66d0e012dc011f80448e2cf38aa7594fce8e0 /src/_pytest/hookspec.py | |
parent | b4f046b7777c7f7f45fbb18ac02100cd5459a02e (diff) | |
download | pytest-7081ed19b892a799e1dea99a7922cab79fefc1df.tar.gz |
hookspec: type annotate pytest_keyboard_interrupt
Diffstat (limited to 'src/_pytest/hookspec.py')
-rw-r--r-- | src/_pytest/hookspec.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index 18a9fb39a..a6decb03a 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -19,6 +19,7 @@ if TYPE_CHECKING: import warnings from typing_extensions import Literal + from _pytest.code import ExceptionInfo from _pytest.config import Config from _pytest.config import ExitCode from _pytest.config import PytestPluginManager @@ -30,6 +31,7 @@ if TYPE_CHECKING: from _pytest.nodes import Collector from _pytest.nodes import Item from _pytest.nodes import Node + from _pytest.outcomes import Exit from _pytest.python import Function from _pytest.python import Metafunc from _pytest.python import Module @@ -761,7 +763,9 @@ def pytest_internalerror(excrepr, excinfo): """ called for internal errors. """ -def pytest_keyboard_interrupt(excinfo): +def pytest_keyboard_interrupt( + excinfo: "ExceptionInfo[Union[KeyboardInterrupt, Exit]]", +) -> None: """ called for keyboard interrupt. """ |