sensortoolkit.lib_utils._check_type.check_type

check_type(obj, accept_types)[source]

Verify the type of an object is an anticipated type or is contained within a list of accepted types.

Parameters
  • obj (type ambiguous) – The object whose type will be assessed.

  • accept_types (list) – A list of types to check the passed object against.

Raises

TypeError – If the object type is not in the list of accepted (anticipated) types.

Returns

The type of the object.

Return type

obj_type (type)