diff --git a/stdlib/2.7/decimal.pyi b/stdlib/2.7/decimal.pyi index f4d98d4d4..ebb6635e0 100644 --- a/stdlib/2.7/decimal.pyi +++ b/stdlib/2.7/decimal.pyi @@ -2,7 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, SupportsAbs, SupportsFloat, SupportsInt, SupportsRound +from typing import Any, SupportsAbs, SupportsFloat, SupportsInt ROUND_DOWN = ... # type: Any ROUND_HALF_UP = ... # type: Any @@ -44,7 +44,7 @@ def setcontext(context): ... def getcontext(): ... def localcontext(ctx=None): ... -class Decimal(SupportsAbs, SupportsFloat, SupportsInt, SupportsRound): +class Decimal(SupportsAbs[Decimal], SupportsFloat, SupportsInt): def __new__(cls, value=..., context=None): ... @classmethod def from_float(cls, f): ... diff --git a/stdlib/2and3/contextlib.pyi b/stdlib/2and3/contextlib.pyi index eaae3ff72..495b24f0d 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, Optional, Type, + Any, Callable, Generator, IO, Iterator, Optional, Type, Generic, TypeVar, ) from types import TracebackType @@ -20,7 +20,7 @@ class ContextManager(Generic[_T]): exc_val: Optional[Exception], exc_tb: Optional[TracebackType]) -> bool: ... -def contextmanager(func: Callable[..., Generator[None, None, None]]) -> Callable[..., ContextManager[None]]: ... +def contextmanager(func: Callable[..., Iterator[_T]]) -> Callable[..., ContextManager[_T]]: ... if sys.version_info < (3,): def nested(*mgr: ContextManager[Any]) -> ContextManager[None]: ...