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

Function lit

py/generate_bidi_protocol.py:133–141  ·  view source on GitHub ↗

A Python source literal, double-quoted (ruff-format style) for strings.

(value: Any)

Source from the content-addressed store, hash-verified

131
132
133def lit(value: Any) -> str:
134 """A Python source literal, double-quoted (ruff-format style) for strings."""
135 if isinstance(value, bool):
136 return "True" if value else "False"
137 if isinstance(value, str):
138 return json.dumps(value)
139 if value is None:
140 return "None"
141 return repr(value)
142
143
144def tuple_lit(items: tuple) -> str:

Callers 10

tuple_litFunction · 0.70
_wire_argsFunction · 0.70
_emit_fieldFunction · 0.70
_emit_enumFunction · 0.70
_emit_recordFunction · 0.70
_emit_unionFunction · 0.70
_emit_commandFunction · 0.70
_emit_domain_classFunction · 0.70
render_errorsFunction · 0.70

Calls

no outgoing calls

Tested by 1