Skip to content

Commit

Permalink
typing: python: pytest_pyfunc_call
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Oct 13, 2020
1 parent 20f86c0 commit 9f00071
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/_pytest/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
from _pytest.warning_types import PytestUnhandledCoroutineWarning

if TYPE_CHECKING:
from typing_extensions import Literal

from _pytest._io import TerminalWriter


Expand Down Expand Up @@ -183,7 +185,7 @@ def async_warn(pyfuncitem: "Function") -> None:


@hookimpl(trylast=True)
def pytest_pyfunc_call(pyfuncitem: "Function"):
def pytest_pyfunc_call(pyfuncitem: "Function") -> "Literal[True]":
testfunction = pyfuncitem.obj
if iscoroutinefunction(testfunction) or (
sys.version_info >= (3, 6) and inspect.isasyncgenfunction(testfunction)
Expand Down

0 comments on commit 9f00071

Please sign in to comment.