diff --git a/stdlib/2and3/contextlib.pyi b/stdlib/2and3/contextlib.pyi index 495b24f0d..0f14afaee 100644 --- a/stdlib/2and3/contextlib.pyi +++ b/stdlib/2and3/contextlib.pyi @@ -1,7 +1,7 @@ # Stubs for contextlib from typing import ( - Any, Callable, Generator, IO, Iterator, Optional, Type, + Any, Callable, Generator, IO, Iterable, Iterator, Optional, Type, Generic, TypeVar, ) from types import TracebackType @@ -23,7 +23,7 @@ class ContextManager(Generic[_T]): def contextmanager(func: Callable[..., Iterator[_T]]) -> Callable[..., ContextManager[_T]]: ... if sys.version_info < (3,): - def nested(*mgr: ContextManager[Any]) -> ContextManager[None]: ... + def nested(*mgr: ContextManager[Any]) -> ContextManager[Iterable[Any]]: ... class closing(Generic[_T], ContextManager[_T]): def __init__(self, thing: _T) -> None: ...