MCPcopy Index your code
hub / github.com/microsoft/playwright-python / patch_error_message

Function patch_error_message

playwright/_impl/_helper.py:366–373  ·  view source on GitHub ↗
(message: str)

Source from the content-addressed store, hash-verified

364
365
366def patch_error_message(message: str) -> str:
367 match = re.match(r"(\w+)(: expected .*)", message)
368 if match:
369 message = to_snake_case(match.group(1)) + match.group(2)
370 message = message.replace(
371 "Pass { acceptDownloads: true }", "Pass 'accept_downloads=True'"
372 )
373 return message
374
375
376def locals_to_params(args: Dict) -> Dict:

Callers 2

failureMethod · 0.90
parse_errorFunction · 0.85

Calls 2

to_snake_caseFunction · 0.85
groupMethod · 0.45

Tested by

no test coverage detected