Skip to content

Commit e25d46a

Browse files
committed
typing: MonkeyPatch.context
1 parent 18ac7e0 commit e25d46a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/_pytest/monkeypatch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import sys
55
import warnings
66
from contextlib import contextmanager
7+
from typing import Generator
78

89
import pytest
910
from _pytest.fixtures import fixture
@@ -108,7 +109,7 @@ def __init__(self):
108109
self._savesyspath = None
109110

110111
@contextmanager
111-
def context(self):
112+
def context(self) -> Generator["MonkeyPatch", None, None]:
112113
"""
113114
Context manager that returns a new :class:`MonkeyPatch` object which
114115
undoes any patching done inside the ``with`` block upon exit:

0 commit comments

Comments
 (0)