New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix inner callback decorators with partials #102873
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Still something wrong here.. will have to look later though as out of time right now |
I think this was actually working as expected because the check was wrong in both places so while it reported it would be run in the executor in in the repr it wouldn't actually be Ie problem is mostly cosmetic but it does result in an extra |
Going to spend some more time digging at this to clean it up more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
thanks |
Proposed change
The partials were wrapped with
@callback
, but the inner function needed to be wrapped with@callback
instead. The check inasync_listen
was wrong and did not match the check inHassJob
. Everything worked ok because the incorrectly decorated function were allrun_immediately
which always ran them as callbacks anyways.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: