Update bind_hass docstring to discourage its use (#96933)

pull/81701/head^2
Erik Montnemery 2023-07-20 13:34:24 +02:00 committed by GitHub
parent 14b553ddbc
commit f809ce9033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1098,7 +1098,11 @@ class Helpers:
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)
return func