def _safety_transformer(value: str) -> str: available_values = { 'safe': model.Post.SAFETY_SAFE, 'sketchy': model.Post.SAFETY_SKETCHY, 'questionable': model.Post.SAFETY_SKETCHY, 'unsafe': model.Post.SAFETY_UNSAFE, } return search_util.enum_transformer(available_values, value)
def _safety_transformer(value: str) -> str: available_values = { "safe": model.Post.SAFETY_SAFE, "sketchy": model.Post.SAFETY_SKETCHY, "questionable": model.Post.SAFETY_SKETCHY, "unsafe": model.Post.SAFETY_UNSAFE, } return search_util.enum_transformer(available_values, value)
def _safety_transformer(value: str) -> str: available_values = { 'safe': model.Post.SAFETY_SAFE, 'sketchy': model.Post.SAFETY_SKETCHY, 'questionable': model.Post.SAFETY_SKETCHY, 'unsafe': model.Post.SAFETY_UNSAFE, } return search_util.enum_transformer(available_values, value)
def _type_transformer(value: str) -> str: available_values = { 'image': model.Post.TYPE_IMAGE, 'animation': model.Post.TYPE_ANIMATION, 'animated': model.Post.TYPE_ANIMATION, 'anim': model.Post.TYPE_ANIMATION, 'gif': model.Post.TYPE_ANIMATION, 'video': model.Post.TYPE_VIDEO, 'webm': model.Post.TYPE_VIDEO, 'flash': model.Post.TYPE_FLASH, 'swf': model.Post.TYPE_FLASH, } return search_util.enum_transformer(available_values, value)
def _type_transformer(value: str) -> str: available_values = { "image": model.Post.TYPE_IMAGE, "animation": model.Post.TYPE_ANIMATION, "animated": model.Post.TYPE_ANIMATION, "anim": model.Post.TYPE_ANIMATION, "gif": model.Post.TYPE_ANIMATION, "video": model.Post.TYPE_VIDEO, "webm": model.Post.TYPE_VIDEO, "flash": model.Post.TYPE_FLASH, "swf": model.Post.TYPE_FLASH, } return search_util.enum_transformer(available_values, value)
def _type_transformer(value: str) -> str: available_values = { 'image': model.Post.TYPE_IMAGE, 'animation': model.Post.TYPE_ANIMATION, 'animated': model.Post.TYPE_ANIMATION, 'anim': model.Post.TYPE_ANIMATION, 'gif': model.Post.TYPE_ANIMATION, 'video': model.Post.TYPE_VIDEO, 'webm': model.Post.TYPE_VIDEO, 'flash': model.Post.TYPE_FLASH, 'swf': model.Post.TYPE_FLASH, } return search_util.enum_transformer(available_values, value)
def _flag_transformer(value: str) -> str: available_values = { 'loop': model.Post.FLAG_LOOP, 'sound': model.Post.FLAG_SOUND, } return '%' + search_util.enum_transformer(available_values, value) + '%'
def _flag_transformer(value: str) -> str: available_values = { "loop": model.Post.FLAG_LOOP, "sound": model.Post.FLAG_SOUND, } return "%" + search_util.enum_transformer(available_values, value) + "%"
def _flag_transformer(value: str) -> str: available_values = { 'loop': model.Post.FLAG_LOOP, 'sound': model.Post.FLAG_SOUND, } return '%' + search_util.enum_transformer(available_values, value) + '%'