mirror of
https://github.com/home-assistant/core.git
synced 2025-12-27 14:31:13 +00:00
Replace *args and **kwargs type hint collections with value types (#54955)
This commit is contained in:
@@ -87,7 +87,7 @@ def deprecated_class(replacement: str) -> Any:
|
||||
"""Decorate class as deprecated."""
|
||||
|
||||
@functools.wraps(cls)
|
||||
def deprecated_cls(*args: tuple, **kwargs: dict[str, Any]) -> Any:
|
||||
def deprecated_cls(*args: Any, **kwargs: Any) -> Any:
|
||||
"""Wrap for the original class."""
|
||||
_print_deprecation_warning(cls, replacement, "class")
|
||||
return cls(*args, **kwargs)
|
||||
@@ -104,7 +104,7 @@ def deprecated_function(replacement: str) -> Callable[..., Callable]:
|
||||
"""Decorate function as deprecated."""
|
||||
|
||||
@functools.wraps(func)
|
||||
def deprecated_func(*args: tuple, **kwargs: dict[str, Any]) -> Any:
|
||||
def deprecated_func(*args: Any, **kwargs: Any) -> Any:
|
||||
"""Wrap for the original function."""
|
||||
_print_deprecation_warning(func, replacement, "function")
|
||||
return func(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user