recwarn: type annotate recwarn fixture

This commit is contained in:
Ran Benita 2020-06-25 14:13:41 +03:00
parent 4d813fdf5e
commit 653c83e127
1 changed files with 2 additions and 1 deletions

View File

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