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

Function exception_class_name

py/generate_bidi_protocol.py:1151–1153  ·  view source on GitHub ↗

The Python exception class name for a BiDi wire error code.

(code: str)

Source from the content-addressed store, hash-verified

1149
1150
1151def exception_class_name(code: str) -> str:
1152 """The Python exception class name for a BiDi wire error code."""
1153 return "".join(word.capitalize() for word in re.split(r"[^a-zA-Z0-9]+", code) if word) + "Exception"
1154
1155
1156_ERRORS_DOCSTRING = '''"""Exception classes for BiDi wire error codes.

Callers 1

render_errorsFunction · 0.85

Calls 2

splitMethod · 0.80
capitalizeMethod · 0.45

Tested by

no test coverage detected