mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Update bind_hass docstring to discourage its use (#96933)
This commit is contained in:
@@ -1098,7 +1098,11 @@ class Helpers:
|
|||||||
|
|
||||||
|
|
||||||
def bind_hass(func: _CallableT) -> _CallableT:
|
def bind_hass(func: _CallableT) -> _CallableT:
|
||||||
"""Decorate function to indicate that first argument is hass."""
|
"""Decorate function to indicate that first argument is hass.
|
||||||
|
|
||||||
|
The use of this decorator is discouraged, and it should not be used
|
||||||
|
for new functions.
|
||||||
|
"""
|
||||||
setattr(func, "__bind_hass", True)
|
setattr(func, "__bind_hass", True)
|
||||||
return func
|
return func
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user