MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / is_affirmative

Function is_affirmative

botasaurus/cache.py:121–129  ·  view source on GitHub ↗
(input_string)

Source from the content-addressed store, hash-verified

119 return files_without_json_extension
120
121def is_affirmative(input_string):
122 # List of affirmative representations
123 affirmative_values = {"true", "yes", "y", "1", "yeah", "yep", "sure", "ok", "okay", "affirmative", "t"}
124
125 # Normalize the input string to lowercase and strip any extra whitespace
126 normalized_string = input_string.strip().lower()
127
128 # Check if the normalized string is in the set of affirmative values
129 return normalized_string in affirmative_values
130
131def pluralize(word, n):
132 return word if n <= 1 else word + 's'

Callers 2

_delete_items_by_filterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected