MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / snake_case

Function snake_case

py/generate.py:149–157  ·  view source on GitHub ↗

Convert a camel case name to snake case. If the name would shadow a Python builtin, then append an underscore.

(name)

Source from the content-addressed store, hash-verified

147
148
149def snake_case(name):
150 """Convert a camel case name to snake case.
151
152 If the name would shadow a Python builtin, then append an underscore.
153 """
154 name = inflection.underscore(name)
155 if is_builtin(name):
156 name += "_"
157 return name
158
159
160def ref_to_python(ref):

Callers 8

process_domainMethod · 0.85
kwargsMethod · 0.85
ref_to_pythonFunction · 0.85
py_nameMethod · 0.85
generate_enum_codeMethod · 0.85
py_nameMethod · 0.85
moduleMethod · 0.85
generate_importsMethod · 0.85

Calls 1

is_builtinFunction · 0.85

Tested by

no test coverage detected