sumnplot.checks.check_type
- sumnplot.checks.check_type(obj, expected_types, obj_name, none_allowed=False)[source]
Function to check object is of given types and raise a TypeError if not.
- Parameters
obj (Any) – Any object to check the type of.
expected_types (Union[Type, Tuple[Union[Type, Type[abc.ABCMeta]], ...]]) – Expected type or tuple of expected types of obj.
none_allowed (bool = False) – Is None an allowed value for obj?