def prepare_string_for_hashing(obj, ignore_string_type_changes=False, ignore_string_case=False):
    """
    Clean type conversions
    """
    original_type = obj.__class__.__name__
    if isinstance(obj, bytes):
        obj = obj.decode('utf-8')
    if not ignore_string_type_changes:
        obj = KEY_TO_VAL_STR.format(original_type, obj)
    if ignore_string_case:
        obj = obj.lower()
    return obj
def prepare_string_for_hashing ( obj , ignore_string_type_changes = False , ignore_string_case = False ) : original_type = obj . __class__ . __name__ if isinstance ( obj , bytes ) : obj = obj . decode ( 'utf-8' ) if not ignore_string_type_changes : obj = KEY_TO_VAL_STR . format ( original_type , obj ) if ignore_string_case : obj = obj . lower ( ) return obj
Clean type conversions