1
mirror of https://github.com/home-assistant/core synced 2024-10-01 05:30:36 +02:00

Update bind_hass docstring to discourage its use (#96933)

This commit is contained in:
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

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