MCPcopy Create free account
hub / github.com/microsoft/Webwright / looksLikePython

Function looksLikePython

assets/compare_trajectory/app.js:549–551  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

547}
548
549function looksLikePython(text) {
550 return /(from\s+[A-Za-z0-9_\.]+\s+import\s+|import\s+[A-Za-z0-9_\.]+|async\s+def\s+|def\s+[A-Za-z_][A-Za-z0-9_]*\s*\(|class\s+[A-Za-z_][A-Za-z0-9_]*\s*[(:]|asyncio\.run\(|await\s+[A-Za-z_][A-Za-z0-9_\.]*\(|if\s+__name__\s*==\s*['"]__main__['"])/m.test(String(text || ''));
551}
552
553function extractPythonHeredocs(text) {
554 const blocks = [];

Callers 6

inferCodeLanguageFunction · 0.85
buildRichTextSectionsFunction · 0.85
extractPythonHeredocsFunction · 0.85
flushFunction · 0.85
extractPythonBlocksFunction · 0.85
extractActionPayloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected