MCPcopy Create free account
hub / github.com/nodejs/undici / parsePythonVersion

Function parsePythonVersion

test/web-platform-tests/wpt-runner.mjs:98–107  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

96}
97
98function parsePythonVersion (output) {
99 const versionRegex = /^Python (?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/m.exec(output.trim())
100
101 if (versionRegex === null) {
102 return null
103 }
104
105 const { major, minor, patch } = versionRegex.groups
106 return { major: Number(major), minor: Number(minor), patch: Number(patch) }
107}
108
109async function getPythonInfo () {
110 pythonInfoPromise ??= (async () => {

Callers 1

getPythonInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected