MCPcopy Create free account
hub / github.com/ceph/ceph / to_snake_case

Function to_snake_case

src/ceph-node-proxy/ceph_node_proxy/util.py:135–137  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

133
134
135def to_snake_case(name: str) -> str:
136 name = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", name)
137 return re.sub("([a-z0-9])([A-Z])", r"\1_\2", name).lower()
138
139
140def normalize_dict(test_dict: Dict) -> Dict:

Callers 3

_update_storageMethod · 0.90
initMethod · 0.90
process_dataFunction · 0.90

Calls 1

subMethod · 0.45

Tested by

no test coverage detected