From bb7b3af9b95bafe633a2a5136e78dcf1d686c4de Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 13 Jun 2020 22:28:55 +0300 Subject: [PATCH] hookspec: fix return type annotation of pytest_runtest_makereport --- src/_pytest/hookspec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index 1c1726d53..4469f5078 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -437,7 +437,9 @@ def pytest_runtest_teardown(item: "Item", nextitem: "Optional[Item]") -> None: @hookspec(firstresult=True) -def pytest_runtest_makereport(item: "Item", call: "CallInfo[None]") -> Optional[object]: +def pytest_runtest_makereport( + item: "Item", call: "CallInfo[None]" +) -> Optional["TestReport"]: """ return a :py:class:`_pytest.runner.TestReport` object for the given :py:class:`pytest.Item <_pytest.main.Item>` and :py:class:`_pytest.runner.CallInfo`.