Update mypy_extensions deprecation messages (#13876)

CC @AlexWaygood
This commit is contained in:
sobolevn
2025-04-24 13:08:36 +03:00
committed by GitHub
parent de7404bcb2
commit 30d6bafafd
+3 -3
View File
@@ -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