HAP-python
HAP-python copied to clipboard
Consider using "wrapt" for decorators.
The AsyncAccessory stuff looks interesting, but I note that you are writing some decorators in there.
GrahamDumpleton wrote a series of blog posts about writing decorators, the TLDR of which is that you should use his wrapt package when writing them to ensure they work reliably, and don't change the name/signature of the object they are wrapping.
https://github.com/GrahamDumpleton/wrapt/tree/master/blog
I don't think that this is that big of a deal, but adding @functools.wraps(wrapped) woun't hurt either.
@schinckel Do you want to do the change and prepare the PR?