Skip to content

Commit db9c181

Browse files
authored
[Deprecated] Add default for DeprecatedParams.__init__ (#15795)
1 parent dfdfb1a commit db9c181

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

stubs/Deprecated/deprecated/params.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ _R = TypeVar("_R")
88
class DeprecatedParams:
99
messages: dict[str, str]
1010
category: type[Warning]
11-
def __init__(self, param: str | dict[str, str], reason: str = "", category: type[Warning] = ...) -> None: ...
11+
def __init__(
12+
self, param: str | dict[str, str], reason: str = "", category: type[Warning] = DeprecationWarning # noqa: Y011
13+
) -> None: ...
1214
def populate_messages(self, param: str | dict[str, str], reason: str = "") -> None: ...
1315
def check_params(
1416
self, signature: Signature, *args: Any, **kwargs: Any # args and kwargs passing to Signature.bind method

0 commit comments

Comments
 (0)