* Simplify handler decorator * add more tests * mypy * formatting * fix 3.10 and improve type handling of decorator * test fix * format