hookspec: fix return type annotation of pytest_runtest_makereport

This commit is contained in:
Ran Benita 2020-06-13 22:28:55 +03:00
parent 25064eba7a
commit bb7b3af9b9
1 changed files with 3 additions and 1 deletions

View File

@ -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`.