Hey, @seandstewart .
By checking typic.protocals, I found that it check type of the obj by inspect.ismethod, inspect.isfunction and inspect.isclass. Personally, I think callable instace of a class with __call__ should be treated as a function, and the protocals should be redirected to the __call__.
A function decorated by a class decorator will be treated as class and the typic.al could not validate the arguments.
Description
Hey, @seandstewart . By checking
typic.protocals
, I found that it check type of the obj byinspect.ismethod
,inspect.isfunction
andinspect.isclass
. Personally, I think callable instace of a class with__call__
should be treated as a function, and the protocals should be redirected to the__call__
.A function decorated by a class decorator will be treated as class and the
typic.al
could not validate the arguments.