How do I write a generic type hint for a Python method for a decorator function?
I created a Python decorator that works great on functions. It allows a function to be called directly or executed from a thread. I would like to use it on methods as well but this results in an error when mypy checks my usage.