Results 70 comments of Vasily Zakharov

I'm also thinking that it would be perfect to have an option to turn all `TypeCheckError`s into warnings without stopping the app. Compare it to, say, C or Java compiler....

> You mean something like `typeguard.config.typecheck_fail_callback = typeguard.warn_on_error`? Yep, for example. I would prefer a keyword argument to `install_import_hook()`. But anything that can be set from Python will do. Environment...

Still, I think that catching exceptions (except `TypeCheckError`) in instrumentation and turning them into warnings is still a good idea anyway.

Great, thank you very much! I somehow missed it. Well, the reality now is there are bugs in typeguard itself. And some of them are still uncaught. For now, I...

Moreover, it seems that ALL exceptions in typeguard-generated code ARE indeed bugs in typeguard. Because in normal operation generated code either returns silently or throws `TypeCheckError`.

Yeah, I understand it. Maybe it could be another option?

Something like this could be appropriate: `typeguard.config.internal_error_callback = typeguard.warn_on_error` Or something like `typeguard.InternalErrorPolicy`.

Maybe an undocumented option would be safe enough.

Thinking more about it, maybe `NameError`s during type checking deserve special treatment. `NameError` means some typing annotation can't be properly processed, but that doesn't mean that annotation as incorrect. Probably...