From 30d6bafafd3e09d4148bda0e0190aed91fb87eb9 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 24 Apr 2025 13:08:36 +0300 Subject: [PATCH] Update `mypy_extensions` deprecation messages (#13876) CC @AlexWaygood --- stubs/mypy-extensions/mypy_extensions.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stubs/mypy-extensions/mypy_extensions.pyi b/stubs/mypy-extensions/mypy_extensions.pyi index 78659fb97..d7e593b97 100644 --- a/stubs/mypy-extensions/mypy_extensions.pyi +++ b/stubs/mypy-extensions/mypy_extensions.pyi @@ -11,7 +11,7 @@ _U = TypeVar("_U") # Internal mypy fallback type for all typed dicts (does not exist at runtime) # N.B. Keep this mostly in sync with typing(_extensions)._TypedDict @type_check_only -@deprecated("mypy_extensions._TypedDict package is deprecated") +@deprecated("Use typing._TypedDict instead") class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): __total__: ClassVar[bool] # Unlike typing(_extensions).TypedDict, @@ -38,7 +38,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): # supposedly incompatible definitions of `__or__` and `__ior__`: def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc] -@deprecated("mypy_extensions.TypedDict is deprecated, use typing.TypedDict instead") +@deprecated("Use typing.TypedDict or typing_extensions.TypedDict instead") def TypedDict(typename: str, fields: dict[str, type[Any]], total: bool = ...) -> type[dict[str, Any]]: ... @overload def Arg(type: _T, name: str | None = ...) -> _T: ... @@ -67,7 +67,7 @@ def KwArg() -> Any: ... # Return type that indicates a function does not return. # Deprecated: Use typing.NoReturn instead. -@deprecated("mypy_extensions.NoReturn is deprecated, use typing.NoReturn or typing.Never instead") +@deprecated("Use typing.NoReturn or typing.Never instead") class NoReturn: ... # This is consistent with implementation. Usage intends for this as