Enhance reading from .python-version (#787)

* Enhance reading from .python-version

* Fix typos

* Fix lint

* Add built files

* Don't use EOL versions in `utils.test.ts`

* Fix Prettier

* Don't use unreleased versions in `utils.test.ts`

* Update versions in `utils.test.ts` again
This commit is contained in:
Kryštof Korb
2025-05-21 23:19:28 +02:00
committed by GitHub
parent a26af69be9
commit 5db1cf9a59
4 changed files with 98 additions and 40 deletions

View File

@ -11,7 +11,7 @@ import {
logWarning,
IS_MAC,
getVersionInputFromFile,
getVersionInputFromPlainFile
getVersionsInputFromPlainFile
} from './utils';
function isPyPyVersion(versionSpec: string) {
@ -35,7 +35,7 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
function resolveVersionInputFromDefaultFile(): string[] {
const couples: [string, (versionFile: string) => string[]][] = [
['.python-version', getVersionInputFromPlainFile]
['.python-version', getVersionsInputFromPlainFile]
];
for (const [versionFile, _fn] of couples) {
logWarning(