From 653c83e127ab4826de456d796ac98b6aebee2f39 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Thu, 25 Jun 2020 14:13:41 +0300 Subject: [PATCH] recwarn: type annotate recwarn fixture --- src/_pytest/recwarn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pytest/recwarn.py b/src/_pytest/recwarn.py index 13622e95d..3a75e21a3 100644 --- a/src/_pytest/recwarn.py +++ b/src/_pytest/recwarn.py @@ -4,6 +4,7 @@ import warnings from types import TracebackType from typing import Any from typing import Callable +from typing import Generator from typing import Iterator from typing import List from typing import Optional @@ -25,7 +26,7 @@ T = TypeVar("T") @fixture -def recwarn(): +def recwarn() -> Generator["WarningsRecorder", None, None]: """Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions. See http://docs.python.org/library/warnings.html for information