Things to check first
Feature description
If provided a broken input in expected_type, check_type() will assume all the checks passed. This is maybe on purpose to allow future evolutions of check_type() but it might be good to state it in the documentation that the default is to assume the type is correct.
Use case
I discovered that when I tried passsing a tuple of annotations, following the classinfo format of isinstance(foo, (str, int)). The correct equivalent input would be a typing.Union[str, int] (or typing.Union[(str, int)], so the tuple only needs to be wrapped with typing.Union).
Things to check first
Feature description
If provided a broken input in
expected_type,check_type()will assume all the checks passed. This is maybe on purpose to allow future evolutions ofcheck_type()but it might be good to state it in the documentation that the default is to assume the type is correct.Use case
I discovered that when I tried passsing a tuple of annotations, following the
classinfoformat ofisinstance(foo, (str, int)). The correct equivalent input would be atyping.Union[str, int](ortyping.Union[(str, int)], so the tuple only needs to be wrapped withtyping.Union).