MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / camel_to_snake

Function camel_to_snake

test/utils_shared.py:426–429  ·  view source on GitHub ↗
(camel)

Source from the content-addressed store, hash-verified

424
425
426def camel_to_snake(camel):
427 # Regex to convert CamelCase to snake_case.
428 snake = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", camel)
429 return re.sub("([a-z0-9])([A-Z])", r"\1_\2", snake).lower()
430
431
432def camel_to_upper_camel(camel):

Callers 13

run_operationMethod · 0.90
check_objectMethod · 0.90
match_event_fieldsMethod · 0.90
_create_entityMethod · 0.90
run_entity_operationMethod · 0.90
run_operationMethod · 0.90
check_objectMethod · 0.90
_create_entityMethod · 0.90
run_entity_operationMethod · 0.90
camel_to_snake_argsFunction · 0.85

Calls

no outgoing calls

Tested by 4

run_operationMethod · 0.72
check_objectMethod · 0.72
run_operationMethod · 0.72
check_objectMethod · 0.72