Good: This removes the need to add type ignores when registering new handlers.
Bad: This allows basically any function. It is the equivalent of using Any.
Of the two bad options, it is better to not force devs to add type ignores.
Alternative considered:
I tried implementing a protocol. Neither mypy nor pyright properly handled all cases.
I have made things!
Good: This removes the need to add type ignores when registering new handlers. Bad: This allows basically any function. It is the equivalent of using Any.
Of the two bad options, it is better to not force devs to add type ignores.
Alternative considered: I tried implementing a protocol. Neither mypy nor pyright properly handled all cases.
Checklist
Attempt with protocol