python-dbus-next
python-dbus-next copied to clipboard
Async methods with @method
Am I missing something or is it not possible to decorate async methods with @method? The wrapped method here is not marked async:
https://github.com/altdesktop/python-dbus-next/blob/master/dbus_next/service.py#L90
Should be easy to check, whether fn is a coroutine or not and then either provide an async or normal version of wrapped. Want a PR?
It is already possible using the aio MessageBus. If you are curious why: https://github.com/altdesktop/python-dbus-next/blob/ab566e16a71bfc9d7e0d29676aa459ec060e72c5/dbus_next/aio/message_bus.py#L345