Type annotate some more hooks & impls

This commit is contained in:
Ran Benita
2020-05-01 14:40:15 +03:00
parent ef34729541
commit 247c4c0482
23 changed files with 175 additions and 99 deletions

View File

@@ -173,7 +173,7 @@ def async_warn_and_skip(nodeid: str) -> None:
@hookimpl(trylast=True)
def pytest_pyfunc_call(pyfuncitem: "Function"):
def pytest_pyfunc_call(pyfuncitem: "Function") -> Optional[object]:
testfunction = pyfuncitem.obj
if is_async_function(testfunction):
async_warn_and_skip(pyfuncitem.nodeid)