()
| 535 | filename = sys.argv[1] if len(sys.argv) > 1 else '<stdin>' |
| 536 | print(json.dumps(extract_sqlmodel(source, filename))) |
| 537 | `; |
| 538 | |
| 539 | let pythonAvailable: boolean | null = null; |
| 540 | let pythonCmd: string = "python3"; |
| 541 | |
| 542 | async function findPython(): Promise<boolean> { |
| 543 | if (pythonAvailable !== null) return pythonAvailable; |
| 544 | |
| 545 | for (const cmd of ["python3", "python"]) { |
| 546 | try { |
| 547 | const { stdout } = await execFileP(cmd, ["--version"], { timeout: 3000 }); |
| 548 | if (stdout.includes("Python 3")) { |
| 549 | pythonCmd = cmd; |
| 550 | pythonAvailable = true; |
| 551 | return true; |
| 552 | } |
| 553 | } catch {} |
| 554 | } |
| 555 | |
| 556 | pythonAvailable = false; |
no outgoing calls
no test coverage detected