mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-08 22:36:18 +08:00
[Deprecated] Update to ~=1.3.1 (#14954)
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
version = "~=1.2.15"
|
||||
version = "~=1.3.1"
|
||||
upstream_repository = "https://github.com/tantale/deprecated"
|
||||
requires = []
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
from .classic import deprecated as deprecated
|
||||
from typing import Final
|
||||
|
||||
__credits__: str
|
||||
__date__: str
|
||||
from .classic import deprecated as deprecated
|
||||
from .params import deprecated_params as deprecated_params
|
||||
|
||||
__version__: Final[str]
|
||||
__author__: Final[str]
|
||||
__date__: Final[str]
|
||||
__credits__: Final[str]
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
from collections.abc import Callable, Iterable
|
||||
from inspect import Signature
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
_P = ParamSpec("_P")
|
||||
_R = TypeVar("_R")
|
||||
|
||||
class DeprecatedParams:
|
||||
messages: dict[str, str]
|
||||
category: type[Warning]
|
||||
def __init__(self, param: str | dict[str, str], reason: str = "", category: type[Warning] = ...) -> None: ...
|
||||
def populate_messages(self, param: str | dict[str, str], reason: str = "") -> None: ...
|
||||
def check_params(
|
||||
self, signature: Signature, *args: Any, **kwargs: Any # args and kwargs passing to Signature.bind method
|
||||
) -> list[str]: ...
|
||||
def warn_messages(self, messages: Iterable[str]) -> None: ...
|
||||
def __call__(self, f: Callable[_P, _R]) -> Callable[_P, _R]: ...
|
||||
|
||||
deprecated_params = DeprecatedParams
|
||||
Reference in New Issue
Block a user