patrick-kidger/jaxtyping

`install_import_hook` skip `no_type_check`

nstarman opened this issue · 1 comments

If a function is decorated with typing.no_type_check then it would be great if jaxtyping.install_import_hook would skip decorating that object. Thanks!

Agreed, that sounds reasonable! See #216.

To be precise, it will still decorate the object because the import hook puts in underneath the typing.no_type_check decorator. But if the inserted decorator itself has a __no_type_check__ attribute, we disable ourselves.