mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-08 22:36:18 +08:00
[typing] Deprecate no_type_check_decorator (#15048)
This commit is contained in:
+8
-4
@@ -408,7 +408,13 @@ _TC = TypeVar("_TC", bound=type[object])
|
||||
|
||||
def overload(func: _F) -> _F: ...
|
||||
def no_type_check(arg: _F) -> _F: ...
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
@deprecated("Deprecated since Python 3.13; removed in Python 3.15.")
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
||||
|
||||
else:
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
||||
|
||||
# This itself is only available during type checking
|
||||
def type_check_only(func_or_cls: _FT) -> _FT: ...
|
||||
@@ -1000,9 +1006,7 @@ class NamedTuple(tuple[Any, ...]):
|
||||
@overload
|
||||
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]], /) -> None: ...
|
||||
@overload
|
||||
@typing_extensions.deprecated(
|
||||
"Creating a typing.NamedTuple using keyword arguments is deprecated and support will be removed in Python 3.15"
|
||||
)
|
||||
@deprecated("Creating a typing.NamedTuple using keyword arguments is deprecated and support will be removed in Python 3.15")
|
||||
def __init__(self, typename: str, fields: None = None, /, **kwargs: Any) -> None: ...
|
||||
@classmethod
|
||||
def _make(cls, iterable: Iterable[Any]) -> typing_extensions.Self: ...
|
||||
|
||||
Reference in New Issue
Block a user